首页 > 大数据 > ELK > ElasticSearch 6.6.0集群安装
1. 环境准备
1.1 Jdk 1.8
1.2 三台虚拟机 centos 7
hostname |
ip |
bigdata00 |
192.168.6.129 |
bigdata01 |
192.168.6.131 |
bigdata02 |
192,168.6.132 |
1.3 系统配置修改
1) /etc/sysctl.conf 添加或修改 vm.max_map_count=262144 ,防止 es 启动时出现如下错误: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2) /etc/security/limits.conf 添加或修改 ,防止 es 启动时出现如下错误:
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
* - nofile 65536 * - memlock unlimited |
3) 添加一个非 root 用户
因为在启动的时候 elasticsearch 无法用 root 用户启动,这里添加一个 es 用户
[root@bigdata02 ~]# useradd es |
1.4 官网下载 elasticsearch 最新的安装包
链接:
2. 安装配置
将安装包上传到服务器 /apps/ 目录下 ( 该目录自定义 )
[root@bigdata00 apps]# tar -xzvf elasticsearch-6.6.1.tar.gz # 解压 [root@bigdata00 apps]# cd /apps/elasticsearch-6.6.1/config [root@bigdata00 config]# vim elasticsearch.yml # 修改配置如下
# 最后保存 # 将配置好的 /apps/elasticsearch-6.6.1/ 分发到另外两台机器 [root@bigdata00 elasticsearch-6.6.1]# scp -r /apps/elasticsearch-6.6.1 bigdata01:/apps/ [root@bigdata00 elasticsearch-6.6.1]# scp -r /apps/elasticsearch-6.6.1 bigdata02:/apps/ # 注意在另外两台机器上的 elasticsearch.yml 的 network.host 改为该机的 ip , node.name 修改为本机的 hostname 如 bigdata01,bigdata02 # 将 /apps/elasticsearch-6.6.1 的拥有这赋予 es 用户 [root@bigdata00 apps]# chown -R es /apps/elasticsearch-6.6.1 # 切换到 es 用户,启动 es [root@bigdata00 apps]# su – es # 后台启动 es [es@bigdata00 ~]$ /apps/elasticsearch-6.6.1/bin/elasticsearch –d # 三台机器通过 jps 工具可以看到 elasticsearch 的进程 [es@bigdata02 ~]$ jps 3991 Jps 3963 Elasticsearch # 通过 curl 查看集群的状态 [es@bigdata02 config]$ curl # 可以看到 3 个节点
|
至此 elasticsearch 集群完成。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31506529/viewspace-2636907/,如需转载,请注明出处,否则将追究法律责任。