ElasticSearch 学习笔记

启动后报错:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

编辑 /etc/security/limits.conf

在文件末尾添加:

elasticsearch – nofile 65535

当前用户重新登录后生效


max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

修复:

修改 Linux 的 max_map_count 值:

1
sudo sysctl -w vm.max_map_count=262144

启动:

1
service elasticsearch.service start

停止:

1
service elasticsearch.service stop

设置开机启动:

1
systemctl enable elasticsearch.service

从压缩包安装:

启动

1
./bin/elasticsearch -d -p pid

关闭:

1
pkill -F pid
Built with Hugo
主题 StackJimmy 设计