ES高级(15) 使用基础(3)安装(3) Windows 集群
1 部署集群
1) 创建 elasticsearch-cluster 文件夹,在内部复制三个 elasticsearch 服务
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224218671-436374816.png)
2) 修改集群文件目录中每个节点的 config/elasticsearch.yml 配置文件
node-1001 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224315817-947675710.png)
node-1002 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224341225-264344408.png)
node-1003 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224424638-441858044.png)
2 启动集群
1) 启动前先删除每个节点中的 data 目录中所有内容(如果存在)
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224545075-1341083951.png)
2)分别双击执行 bin/elasticsearch.bat, 启动节点服务器,启动后,会自动加入指定名称的集群
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224609283-522145840.png)
3 测试集群
查看集群状态
node-1001 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224728908-1085701569.png)
node-1002 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224752993-1176344199.png)
node-1003 节点
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224816637-1895801881.png)
向集群中的 node-1001 节点增加索引
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224909784-2097424677.png)
向集群中的 node-1002 节点查询索引
![](https://img2020.cnblogs.com/blog/1275415/202109/1275415-20210901224929161-1691196553.png)
本文来自博客园,作者:秋华,转载请注明原文链接:https://www.cnblogs.com/qiu-hua/p/15216752.html