单机(简单启动)
启动
sh elasticsearch-5.5.2/bin/elasticsearch -d
es配置文件
vim elasticsearch-5.5.2/config/elasticsearch.yml
修改network.host 这样别的电脑就可以访问了
network.host: 192.168.163.129
常见错误。
1.
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] 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/security/limits.conf文件,添加或修改如下行: (请切换到root用户 然后强制修改文件)
* hard nofile 65536
* soft nofile 65536
2.
[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=2621441”设置
永久改变(生效)。
sudo sysctl -p /etc/sysctl.conf
3.
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
由于elasticsearch5.5默认分配jvm空间大小为2g,修改jvm空间分配
vi /home/es/elasticsearch-5.5.2/config/jvm.options
默认配置
-Xms2g
-Xmx2g
改成
-Xms512m
-Xmx512m