一. 安装错误解决办法
启动es,如果报错如下:
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
-
修改
/etc/sysctl.conf
添加下面配置:vm.max_map_count=655360 【修该项即可】
然后执行命令:
sysctl -p
-
修改
/etc/security/limits.conf
添加如下内容:* soft nofile 65536 #【修改该项即可】 * hard nofile 131072 * soft nproc 2048 * hard nproc 4096
最后重启终端就可以啦。
-
验证是否安装成功
ps aux | grep elasticsearch 或 curl -XGET 127.0.0.1:9200
二. 基本操作
查看所有索引
curl -XGET 'localhost:9200/_cat/indices?v&pretty'
网友评论