安装
首先安装jdk
sleasticsearch安装并启动 :
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.2.zip
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.2.zip.sha512
$ shasum -a 512 -c elasticsearch-6.1.2.zip.sha512
$ unzip elasticsearch-6.1.2.zip
$ cd elasticsearch-6.1.2/
$ ./bin/elasticsearch
问题:
[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]
解决方案:
切换到root用户
执行 $ vi /etc/security/limits.conf
找到 * soft nofile 65536 并修改
然后
执行 $ vi /etc/sysctl.conf
添加:vm.max_map_count=262144
保存退出后,执行 $ sysctl -p