栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

centos7 - elasticsearch 7.6.2集群

centos7 - elasticsearch 7.6.2集群

小伙伴们,你们好呀,我是老寇

注意:上一篇安装elasticsearch 7.6.2教程的扩展,需要看上篇的安装教程,点击我

1.准备三台机器(三台需提前安装好elasticsearch 7.6.2)

192.168.1.1 node-elasticsearch-1

192.168.1.2 node-elasticsearch-2

192.168.1.3 node-elasticsearch-3

2.配置三台机器的elasticsearch.yml

node-elasticsearch-1(改一下节点名称)

http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0
cluster.name: laokou-elasticsearch
node.name: node-elasticsearch-1
http.port: 9200
node.master: true
node.data: true
node.ingest: false
cluster.initial_master_nodes: ["node-elasticsearch-1","node-elasticsearch-2","node-elasticsearch-3"]
discovery.zen.ping.unicast.hosts: ["192.168.1.1", "192.168.1.2","192.168.1.3"]
discovery.zen.minimum_master_nodes: 1
path.data: /home/koushenhai/elasticsearch/data # 数据目录位置
path.logs: /home/koushenhai/elasticsearch/logs # 日志目录位置

node-elasticsearch-2(改一下节点名称)

http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0
cluster.name: laokou-elasticsearch
node.name: node-elasticsearch-2
http.port: 9200
node.master: true
node.data: true
node.ingest: false
cluster.initial_master_nodes: ["node-elasticsearch-1","node-elasticsearch-2","node-elasticsearch-3"]
discovery.zen.ping.unicast.hosts: ["192.168.1.1", "192.168.1.2","192.168.1.3"]
discovery.zen.minimum_master_nodes: 1
path.data: /home/koushenhai/elasticsearch/data # 数据目录位置
path.logs: /home/koushenhai/elasticsearch/logs # 日志目录位置

node-elasticsearch-3(改一下节点名称)

http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0
cluster.name: laokou-elasticsearch
node.name: node-elasticsearch-3
http.port: 9200
node.master: true
node.data: true
node.ingest: false
cluster.initial_master_nodes: ["node-elasticsearch-1","node-elasticsearch-2","node-elasticsearch-3"]
discovery.zen.ping.unicast.hosts: ["192.168.1.1", "192.168.1.2","192.168.1.3"]
discovery.zen.minimum_master_nodes: 1
path.data: /home/koushenhai/elasticsearch/data # 数据目录位置
path.logs: /home/koushenhai/elasticsearch/logs # 日志目录位置

3.分别启动node-elasticsearch-1、node-elasticsearch-2、node-elasticsearch-3(和上篇启动es命令一致)

4.运行截图

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/752765.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号