小伙伴們,你們好呀,我是老寇
注意:上一篇安裝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.運行截圖

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/438086.html
標籤:其他
上一篇:TiDB基本原理學習
