es啓動默認不能使用root用戶,因此須要新建立一個用戶來啓動。bootstrap
啓動時可能出現的問題:elasticsearch
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]spa
[2]: max number of threads [1024] for user [esuser1] is too low, increase to at least [4096]線程
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]ip
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk內存
1.修改最大文件描述符數量爲65536:it
編輯文件:/etc/security/limits.confio
添加:ast
* soft nofile 65536class
* hard nofile 65536
2.修改用戶最大線程數爲4096
編輯文件:/etc/security/limits.d/90-nproc.conf
* soft nproc 1026
修改成:
* soft nproc 4096
3.修改最大虛擬內存區域爲262144
修改文件:/etc/sysctl.conf
添加
vm.max_map_count = 262144
4.在elasticsearch.yml文件中的memory欄添加
bootstrap.memory_lock: false
bootstrap.system_call_filter: false