一、注意事项
1.在elasticsearch的bin目录下运行./elasticsearch -d的时候必须使用非root账户,-d代表在后台运行,日志文件在log文件夹下面
2.关于配置文件,最重要的一点是在配置文件最后需要开启,能够解决:
[4]: 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
二、启动时各种异常总结
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [3756] for user [flowyj] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决:
A.编辑/etc/security/limit.conf ,修改后文件如图:
B.编辑 /etc/sysctl.conf,修改后文件如图:
提示: 修改上述配置后需要重新登录才能生效