Elasticsearch5.5 安装与配置
全文搜索引擎 Elasticsearch 入门教程(阮一峰)
ES的增删改查
ES的几种查询(1、query string search,2、query DSL,3、query filter,4、full-text search,5、phrase search,6、highlight search)
es常用操作
- 查看启动是否成功
curl 'http://localhost:9200/?pretty';
lsof -i:9200
【注】设置可以远程访问后,将localhost改为远程ip即可访问
http://XXX.XXX.XXX.XXX:9200/?pretty

启动es时出现的问题
一、max file descriptors [65535] for elasticsearch process is too low
- 切换到root用户
vim /etc/security/limits.conf
- 在文件后追加(***为用户名)
*** hard nofile 65536
*** soft nofile 65536
- 回到***用户
su ***
ulimit -Hn
发现已经变成65536
二、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决:
切换到root用户
执行命令:
sysctl -w vm.max_map_count=262144
查看结果:
sysctl -a|grep vm.max_map_count
显示:
vm.max_map_count = 262144
上述方法修改之后,如果重启虚拟机将失效,所以:
解决办法:
在 /etc/sysctl.conf文件最后添加一行
vm.max_map_count=262144
即可永久修改
网友评论