Elasticsearch版本:6.3.2
Kibana版本:6.3.2
1.es安装
按照官方提示操作即可。
通过yum安装或者下载tar包解压。
安装完成之后,需要修改一些配置
①修改文件 /etc/sysctl.conf
#添加以下内容vm.max_map_count=655360
执行命令:
sysctl -p
这一步可以解决问题:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
②修改文件/etc/security/limits.conf (es为启动es程序的用户,默认是不允许使用root用户操作es的)
es soft nofile 65536 es hard nofile 65536 es soft nproc 2048 es hard nproc 2048 es soft memlock unlimited es hard memlock unlimited
解决的问题:
[2018-08-14T09:35:24,417][WARN ][o.e.b.JNANatives ] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory[2018-08-14T09:35:24,417][WARN ][o.e.b.JNANatives ] This can result in part of the JVM being swapped out.[2018-08-14T09:35:24,418][WARN ][o.e.b.JNANatives ] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536[2018-08-14T09:35:24,418][WARN ][o.e.b.JNANatives ] These can be adjusted by modifying /etc/security/limits.conf, for example: # allow user 'es' mlockall es soft memlock unlimited es hard memlock unlimited[2018-08-14T09:35:24,418][WARN ][o.e.b.JNANatives ] If you are logged in interactively, you will have to re-login for the new limits to take effect.
③修改文件 /etc/security/limits.d/90-nproc.conf (将1024改为2048)
* soft nproc 2048
④修改 es配置文件 config/elasticsearch.yml (根据安装方式不同,这个文件位置不同)
bootstrap.system_call_filter: false
解决的问题:
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk