链接:https://pan.baidu.com/s/16SOoN7ZveFu1ly9B2wudoA?pwd=8fm7
知识准备
https://blog.csdn.net/tongxin_tongmeng/article/details/126342599
- 1.防火墙打开端口权限
- firewall-cmd --zone=public --add-port=9200/tcp --permanent
- firewall-cmd --reload
-
- 2.编辑/etc/security/limits.conf
- * soft nofile 65536
- * hard nofile 65536
-
- 3.编辑/etc/security/limits.d/20-nproc.conf
- * soft nofile 65536
- * hard nofile 65536
- * hard nproc 4096
-
- 4.编辑/etc/sysctl.conf
- vm.max_map_count=655360
- 重新加载:sysctl -p
-
- 注意:重启虚拟机确保修改生效
- 编辑/etc/profile添加elasticsearch环境变量
- export ES_HOME=/home/elasticsearch/elasticsearch-8.4.1
- export ES_JAVA_HOME=/home/elasticsearch/elasticsearch-8.4.1/jdk
- export PATH=$PATH:$ES_HOME/bin/
- 环境变量立刻生效:source /etc/profile
- 判断环境变量生效:elasticsearch -d
- 添加用户:useradd es8
- 设置密码:passwd es8
- 用户授权:chown -R es8:es8 /home/elasticsearch
- 切换用户:su es8
- 启动ES服务:elasticsearch -d
- 查看ES服务:ps -ef | grep -i elasticsearch
- 关闭ES服务:kill -9 进程号
- 编辑/home/elasticsearch/elasticsearch-8.4.1/config/elasticsearch.yml
- xpack.security.enabled: false
- xpack.security.enrollment.enabled: false
- xpack.security.http.ssl:
- enabled: false
- keystore.path: certs/http.p12