1 命令 tar -zxvf elasticsearch-6.1.1.tar.gz 解压ES
2 root用户无法启动ES,需要从新创建新用户
3 adduser centos 添加用户,centos为我的用户名
4 passwd centos 为centos用户设置密码,输入两次密码
5 chown -R centos:centos elasticsearch-6.3.0 为用户centos设置权限
6 切换至centos用户,su centos
7 bin/elasticsearch 启动ES
8 启动ES失败:
如报:问题一:ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
解决:1 切换到root用户,vi /etc/security/limits.conf
2 centos soft nofile 65536
centos hard nofile 65536
centos是用户
重新登录,使配置生效
用ulimit -Hn命令查看硬限制 会发现数值有4096改成65535
问题二: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决: 切换到root用户
1、修改max_map_count值
命令: sudo sysctl -w vm.max_map_count=262144
2、查看是否修改为262144
命令: more /proc/sys/vm/max_m