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

0 0 投票数
Article Rating
订阅评论
提醒
guest
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x