2 settings -- 2 configuration

ES only needs a few setting interfaces, and most of the settings can be set online through the api interface.
Two configuration files, elasticsearch.yml, are required to configure
es information
and log4j2.properties to configure es log information
. Both files exist in the config directory ($ES_HOME/config/). The config path for Debian and RPM package installation is /etc/elasticsearch/
If you want to use the specified config path to
start./bin/elasticsearch -Epath.conf=/path/to/my/config/

Set the data and log saving path
path.data: /var/lib/
elasticsearch path.logs: /var/log/elasticsearch

uses environment variable settings
node.name: ${HOSTNAME}
network.host: ${ES_NETWORK_HOST}

If you don't want to save the settings in the configuration file, you can also Use ${prompt.text} or ${prompt.secret} to set it when starting es. ${prompt.secret} will not display the information you enter in the middle end. And ${prompt.text} will show.
For example: node.name=${prompt.text}
you will be asked to enter the real value when starting es (similar to the following):
Enter value for [node.name]:

Note: If ${prompt.text} or ${prompt.secret} is set in the configuration file, then es will not start successfully in the background (-d parameter stands for background startup).

You can also specify the default value at
startup./ bin/elasticsearch -Edefault.node.name=My_Node


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326800216&siteId=291194637