七、分佈式環境搭建——ElasticSearch集羣搭建及集羣管理工具cerebro

首先各節點安裝好elasticsearch
參考:https://mp.csdn.net/mdeditor/91390470#

1 集羣配置elasticsearch.yml
在這裏插入圖片描述
(1)節點1配置
cluster.name: tang-cluster
node.name: es-2

注意需要建立/elastic/data目錄
path.data: /elastic/data
node.master: true
node.data: true

path.logs: /elastic/logs

network.host: ip(本機ip)
http.port: 9200
transport.tcp.port: 9300 集羣間的tcp通信端口
集羣中的其他節點(可以配置多個 如[“192.168.2.137”,“192.168.2.142”])
discovery.zen.ping.unicast.hosts: [“192.168.2.137”]master節點的ip

discovery.zen.minimum_master_nodes: 2(數字爲集羣數量/2 +1)根據公式

(2)節點2配置
cluster.name: tang-cluster
node.name: es-2

注意需要建立/elastic/data目錄
path.data: /elastic/data
node.master: true
node.data: true

path.logs: /elastic/logs

network.host: ip(本機ip)
http.port: 9200
transport.tcp.port: 9300 集羣間的tcp通信端口
集羣中的其他節點(可以配置多個 如[“192.168.2.137”,“192.168.2.142”])
discovery.zen.ping.unicast.hosts: [“192.168.2.137”]

discovery.zen.minimum_master_nodes: 2(數字爲集羣數量/2 +1)

2 集羣管理工具cerebro
(1)解壓
(2)bin路徑下打開命令窗口
(3)訪問localhost:9000 端口默認爲9000
(4)輸入ES服務的ip和端口
在這裏插入圖片描述
(5)可以查看到集羣信息
在這裏插入圖片描述
(6)創建索引
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章