# 添加一个名字是es工作组
groupadd es
# 添加用户es设置密码elasticsearch并设置工作组es
useradd es -g es -p elasticsearch
不出意外的话按照上面的方式安装,你是运行不起来的
问题一
这个问题之前安装的时候没有遇见过,不知道具体原因
解决方式
修改elasticsearch.yml配置文件,添加xpack.ml.enabled: false
问题二
为了可以外网访问,我们需要在elasticsearch.yml配置文件中添加network.host: 0.0.0.0
但是在添加了这个之后会冒出来这么个错误
这里明确指出了三个问题,一个一个解决
1)错误:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
在/etc/sysctl.conf文件最后添加一行vm.max_map_count=262144
2)错误:system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
原因:
这是在因为Centos6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
解决办法:
在elasticsearch.yml配置文件中加入以下配置
~~~
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
~~~
3)错误:JVM is using the client VM [Java HotSpot(TM) Client VM] but should be using a server VM for the best performance
原因:
JVM正在使用客户机VM [Java HotSpot(TM)客户机VM],但是为了获得最佳性能,应该使用服务器VM
解决办法:
修改JDK中jre/lib/i386/jvm.cfg文件
原来的文件应该是这样的
把这两个位置调换
原文:https://www.cnblogs.com/SunArmy/p/11136039.html