can not run elasticsearch as root
groupadd genghua useradd genghua -g genghua -p genghua chown -R genghua:genghua elasticsearch-7.0.1 su genghua
max number of threads [3894] for user [genghua] is too low, increase to at least [4096]
vim /etc/security/limits.conf
增加配置
* soft nproc 4096 * hard nproc 4096
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
vi /etc/sysctl.conf
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 /usr/local/elasticsearch-7.0.1/config/elasticsearch.yml
cluster.initial_master_nodes: [“node-1”]