OpenSearch installation
Installation procedure
There are several ways to install OpenSearch, explained step by step in the official documentation.
Configuration
To configure your OpenSearch instance, edit the ${OPENSEARCH_HOME}/config/opensearch.yml
file as follows:
- To define the name of the OpenSearch cluster, uncomment the
cluster.name
property and change its value (eg:flower-es-dev
) - In the case of an OpenSearch cluster, uncomment the
node.name
property and change its value to that of your choice (e.g.node-1
) - Add the
action.auto_create_index: false
property - If several OpenSearch nodes are deployed on the same computer, you need to change the value of the
http.port
property - To access OpenSearch from a remote server, you need to uncomment the
network.host
property and set one of the following values:0.0.0.0
- DNS name
- IP address
Security
OpenSearch internal users are defined in the ${OPENSEARCH_HOME}/plugins/opensearch-security/securityconfig/internal_users.yml
file.
To change a user’s password:
- run command:
${OPENSEARCH_HOME}/plugins/opensearch-security/tools/hash.sh -p <new_password>
- Replace the password hash in the
${OPENSEARCH_HOME}/plugins/opensearch-security/securityconfig/internal_users.yml
file for the desired user. - in order for the changes to take effect, run the
${OPENSEARCH_HOME}/plugins/opensearch-security/tools/securityadmin.sh
script
For more information on securing an OpenSearch instance, official documentation is available here.
Start
Manuel
Finally, start OpenSearch by going to the ${OPENSEARCH_HOME}/bin
folder and running the opensearch
script.
Service
To install OpenSearch as a systemd
service, the following file must be created in the /etc/systemd/system directory as follows:
To have the service started automatically by systemd, run the following commands:
systemctl enable opensearch.service
Validation
To check that OpenSearch is working properly, go to http://localhost:9200/.