Home >Computer Tutorials >Computer Knowledge >Baidu search: Lan Yiyun [Install elasticsearch8.7.0 on centos7 system and set a password to access the tutorial. 】

Baidu search: Lan Yiyun [Install elasticsearch8.7.0 on centos7 system and set a password to access the tutorial. 】

PHPz
PHPzforward
2024-03-27 12:31:30438browse

Baidu search: Lan Yiyun [Install elasticsearch8.7.0 on centos7 system and set a password to access the tutorial. 】

The tutorial for installing and setting passwords to access Elasticsearch 8.7.0 is as follows:

  1. Log in to your CentOS 7 system.
  2. Make sure your system has Java Runtime Environment (JRE) installed. If it is not installed, you can execute the following command to install it:

    sudo yum install java
  3. Download the installation package of Elasticsearch 8.7.0. You can find it on the Elasticsearch official website (

    ) to find the download link for the latest version. Execute the following command in the terminal to download:

    wget [Elasticsearch下载链接]

    Replace
    [Elasticsearch download link] with the download link of Elasticsearch 8.7.0.

  4. Unzip the Elasticsearch installation package. Execute the following command:

    tar xvf [Elasticsearch压缩包文件名]

    Replace
    [Elasticsearch compressed package file name] with the file name of the Elasticsearch compressed package you downloaded.

  5. Enter the decompressed Elasticsearch directory. Execute the following command:

    cd [Elasticsearch目录]

    Replace
    [Elasticsearch directory] with the full path to the decompressed Elasticsearch directory.

  6. Open the Elasticsearch configuration file elasticsearch.yml and set password access. Execute the following command:

    vi config/elasticsearch.yml

    Add the following configuration in the configuration file:

    xpack.security.enabled: true

    Save and exit the configuration file.

  7. Start the Elasticsearch service. Execute the following command:

    bin/elasticsearch

    Elasticsearch will start.

  8. Create a super user and set a password. Execute the following command:

    bin/elasticsearch-setup-passwords interactive

    Follow the prompts to set a password and remember it.

  9. Verify whether Elasticsearch starts successfully. Execute the following command:

    curl -XGET '

    If the connection is successful and Elasticsearch information is returned, it means that the installation and password access settings have been completed.

Now, you have successfully installed and set password to access Elasticsearch 8.7.0. You can use the password you set to access and manage your Elasticsearch instance.

The above is the detailed content of Baidu search: Lan Yiyun [Install elasticsearch8.7.0 on centos7 system and set a password to access the tutorial. 】. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete

Related articles

See more