Caused by: java.lang.RuntimeException: can not run elasticsearch as root

爆报错截图如下:Caused by: java.lang.RuntimeException: can not run elasticsearch as root此错误是在centos7中启动elasticsearch6.0是报的错,原因报错中也已经写明是因为elasticsearch不能用root用户启动,解决方法如下:1.需要新建个用户组与用户:

groupadd elsearch
useradd elsearch -g elsearch
passwd elsearch

2.给用户赋予权限

cd /opt
chown -R elsearch:elsearch  elasticsearch-6.0.1

3.再次切换用户重新启动:

su elsearch 
cd /optelasticsearch-6.0.1/bin
./elasticsearch
上一篇:2.CTFhub技能树 web前置技能 http协议 302跳转


下一篇:短信通知PHP语言怎么开发?