The tutorial for installing and setting passwords to access Elasticsearch 8.7.0 is as follows:
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
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.
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.
Enter the decompressed Elasticsearch directory. Execute the following command:
cd [Elasticsearch目录]
Replace [Elasticsearch directory]
with the full path to the decompressed Elasticsearch directory.
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.
Start the Elasticsearch service. Execute the following command:
bin/elasticsearch
Elasticsearch will start.
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.
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!