elasticsearch6 ubuntu16.04安装部署
1,下载gz文件
https://www.elastic.co/start
2,拷贝到linux目录 解压
tar -zxvf [file name]
3,修改confog
cd [root dir]//elasticsearch/elasticsearch-6.2.3/config/elasticsearch.yml
添加外网访问:
network.host: 0.0.0.0
4.修改系统配额(虚拟机)
切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p 重启
[
5,配置/etc/profile
最后一行加上
ulimit -SHn 4096
ulimit -u 4096
#vi /etc/security/limits.d/90-nproc.conf
#添加
#* soft nproc 4096
]
[
线上:
修改/etc/security/limits.conf,添加或者修改如下(切换root用户)
* hard nofile 65536
* soft nofile 65536
重启:
重新登录,不需要重启
]
6,启动应用【使用非root用户启动】
[root dir]//elasticsearch/elasticsearch-6.2.3/bin/elasticsearch
7,配置启动项
修改 /etc/rc.local
exit 0之前添加特定用户后台执行
【root dir】/elasticsearch-6.2.3/bin/auto_elastic.sh
(此为ubuntu用户)
重启,检查9200,9300端口占用。
sh文件列表:
#!/bin/bash
su ubuntu<<!
cd /home/ubuntu/elasticsearch/elasticsearch-6.2.3/bin/
./elasticsearch -d
exit
!
参考:
https://blog.csdn.net/KimSoft/article/details/8024216
https://blog.csdn.net/weixin_39922154/article/details/78730950
获取更多帮主请关注小程序

更多推荐



所有评论(0)