To install Elasticsearch on CentOS Stream 9, follow the steps below:
Step 1 : Ensure your system packages are up to date.
Step 2 : Install Java, which is required for Elasticsearch.
Step 3 : Verify the installed Java version.
Step 4 : Import the Elasticsearch PGP key for package verification.
Step 5 : Create the elasticsearch.repo file and add the repository configuration.
Add the following lines:
Save the file.
Step 6 : Install Elasticsearch.
Step 7 : Start the Elasticsearch service.
Step 8 : Enable Elasticsearch to start on boot.
Step 9 : Open the Elasticsearch configuration file.
Find the line xpack.security.enabled
and set it to true
.
Step 10 : Restart the Elasticsearch service.
Step 11 : Verify the Elasticsearch service status.
Step 12 : Reset the password for the built-in "elastic" user.
Step 13 : Use curl to verify the installation.
Congratulations! You have successfully installed and configured Elasticsearch on CentOS Stream 9.