1.下载:https://www.elastic.co/cn/downloads/
2.解压 tar zxvf elasticsearch-5.6.5.tar.gz
3.添加用户:useradd -m 用户名 然后设置密码 passwd 用户名
useradd -m es
passwd es
修改文件夹权限
chown -R es elasticsearch
4.切换root 用户 修改配置文件/etc/security/limits.conf
否则会出现如下问题:
max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
6.切换root账户 vim /etc/sysctl.conf
增加一行 vm.max_map_count=655360
接着执行 sysctl -p
否则出现如下问题:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least
7.Centos6出现如下问题,其他版本暂时没有实验
system call filters failed to install; check the logs and fix your configuration or disable system c
解决:
Centos6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true
禁用:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false