mac玩得好好滴,一次性启动成功,结果在centos上安装时,遇坑无数,记录一下:
一、只能localhost访问的问题
修改 confelasticsearch.yml
network.host: 0.0.0.0 http.port: 9200 discovery.zen.ping.unicast.hosts: ["0.0.0.0"]
二、各种启动 ... too low 的妖娥子
比如:
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]
2.1 修改/etc/security/limits.conf
# /etc/security/limits.conf * soft nofile 65536 * hard nofile 131072 * soft nproc 2048 * hard nproc 4096
2.2 修改 /etc/security/limits.d/90-nproc.conf
* soft nproc 2048 root soft nproc unlimited deploy soft nproc unlimited
2.3 修改/etc/sysctl.conf
追加(如果已存在,则直接修改)
vm.max_map_count=262144
然后执行sysctl -p
三、启动中的 bootstrap checks failed
仍然修改 confelasticsearch.yml
bootstrap.memory_lock: false bootstrap.system_call_filter: false