centos7 - elasticsearch 7.6.2集群

Posted k↑

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.运行截图

以上是关于centos7 - elasticsearch 7.6.2集群的主要内容,如果未能解决你的问题,请参考以下文章

linux centos7安装elasticsearch

linux centos7安装elasticsearch

Elasticsearch-6.7.0.tar.gz版本centos7环境--下载安装运行

Centos7安装Elasticsearch7(解决jdk版本jvm内存问题)

Centos7安装Elasticsearch7(解决jdk版本jvm内存问题)

centos7 下安装electricsearch