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