elasticsearch5.5.1安装过程遇到的问题及解决方法

问题1. Caused by: java.lang.RuntimeException: can not run elasticsearch as root
用户不能是root,新建一个用户即可

useadd perist  
passwd perist  
sudo vim /etc/sudoers

sudo su perist

启动 ./bin/elasticsearch

问题2. ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

sudo vim /etc/security/limits.conf

* soft nofile 65536  
* hard nofile 65536 

reboot
(临时修改可以用ulimit -n 65536)

sudo sysctl -w vm.max_map_count=262144

ulimit -n

问题3. ulimit: command not found
sudo vi /etc/pam.d/su
增加pam_limits.so模块引用
session required pam_limits.so

reboot

./bin/elasticsearch

started

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×