首先安装jdk,前面有文章这里省去,jdk版本组好和项目部署的jdk一个版本,之后编译和反编译比较高效
上传解压
进入到bin目录下面启动
报错
启动elasticsearch不能用root用户,
再用./elasticsearcjh -Des.insecure.allow.root 进行启动还是不行
得自己创建用户,给它分组
授权
然后更改用户esuser------>su esuser,然后进入bin里面启动,启动成功。测试:
现在需要实现远程访问:
进入config下面,编辑yml目录
再次启动报错
第四条错误在elasticsearch.yml里面最后插入
然后切换到root用户
第一处错误
vim /etc/security/limits.conf
esuser soft nofile 65536
esuser hard nofile 65536
esuser soft nproc 4096
esuser hard nproc 4096
第二处错误:
vim /etc/security/limits.d/90-nproc.conf
第三处错误:
vim /etc/sysctl.conf
最后加上 vm.max_map_count=655360
之后执行sysctl -w vm.max_map_count=262144
之后sysctl -p 查看
关闭防火墙service iptables stop
后台启动 nohup ./elasticsearch > …/test.log 2>&1
完成。