Elasticsearch集群 windows下部署ES集群,多台服務器


針對於Elasticsearch集群部署基本上就是一些配置就可以解決的,我們這塊簡單稱為(ES)。

ES下載地址為:https://www.elastic.co/cn/downloads/past-releases

如果不能下載,可以轉至https://download.csdn.net/download/weixin_41986096/11635439

進行下載。

下來選擇盤符建立es-cluster文件夾,名稱可以隨意替換,我們將es復制3份,分別如下圖所示(偽集群部署方式)

然后打開elasticsearch.yml文件,進行相關配置:

我們也可以將三個ES放入不同的服務器:

將elasticsearch-6.2.0-1 ,

elasticsearch-6.2.0-2,

elasticsearch-6.2.0-3分別放入

IP為192.168.171.21,

192.168.171.22,

192.168.171.23服務器中。

分別對3台服務器進行配置:

 

192.168.171.21進行配置:

cluster.name: my-application

node.name: node-1

network.host: 192.168.171.21

http.port: 9200

transport.tcp.port: 9300

discovery.zen.ping.unicast.hosts: ["192.168.171.21:9300", "192.168.171.22:9301", "192.168.171.23:9302"]

http.cors.enabled: true

http.cors.allow-origin: "*"

 

192.168.171.22進行配置:

cluster.name: my-application

node.name: node-2

network.host: 192.168.171.22

http.port: 9201

transport.tcp.port: 9301

discovery.zen.ping.unicast.hosts: ["192.168.171.21:9300", "192.168.171.22:9301", "192.168.171.23:9302"]

http.cors.enabled: true

http.cors.allow-origin: "*"

 

192.168.171.23進行配置:

cluster.name: my-application

node.name: node-3

network.host: 192.168.171.23

http.port: 9202

transport.tcp.port: 9302

discovery.zen.ping.unicast.hosts: ["192.168.171.21:9300", "192.168.171.22:9301", "192.168.171.23:9302"]

http.cors.enabled: true

http.cors.allow-origin: "*"

 

下載head進行集群測試:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM