centos7 installation Elasticsearch7

  1. Download Elasticsearch7

   Direct download Quguan network may be slow. Download an hour before it is finished.

  2. Download finished extracting archive

tar -zxvf xxxx

  3. Move directory

mv elasticsearch-7.2.0   /usr/local/

  3. Create a new user, es not let you use root.

useradd  es
passwd is 
chown -R  es elasticsearch-7.2.0
4. Modify the configuration file
config vim / elasticsearch.yml 
# modify for your own ip
network.host: xxxx
# Notes to this release
cluster.initial_master_nodes: [ "node-1" , "node-2"]

 5. Start

./elasticsearch

6. error resolution, if the following error.

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

 

vim /etc/security/limits.conf
* Soft nofile           65536 
* hard nofile           65536
*               soft    nproc           4096
*               hard    nproc           4096
 
we /etc/sysctl.conf
vm.max_map_count=262144
sysctl -p
At this point it can be started.


Guess you like

Origin www.cnblogs.com/songfahzun/p/11094110.html