1.官网下载
2.上传Linux后解压
3.移动解压缩后es文件夹:
4.创建data目录
mkdir data
5.修改核心配置---elasticearch.yml
6.修改JVM参数
7.添加用户
ES不允许使用root 操作es,需要添加用户,操作如下:
useradd esuser chown -R esuser:esuser /usr/local/elasticsearch-7.4.2 su esuser whoami
8.启动ES
./elasticsearch
如果出现以下错误:
切换到root用户去修改配置
vim /etc/security/limits.conf
* soft nofile 65536 * hard nofile 131072 * soft nproc 2048 * hard nproc 4096
别忘记刷新一下
sysctl -p
最后再次启动!
9.测试
访问虚拟机ip+端口号9200,如果访问不了,则查看防火墙是否允许端口访问!如下则表示ok
原文:https://www.cnblogs.com/jantsch/p/14744959.html