ElasticSearch7.9集群搭建-
- 单台搭建方法见上一篇文章 , 集群部署 单台操作是一样的,只需要修改其配置文件。
2台服务器172.168.13.208 和 172.168.13.209
配置文件分别为
# ---------------------------------- Cluster -----------------------------------
cluster.name: elk
# ------------------------------------ Node ------------------------------------
node.name: master
# ----------------------------------- Paths ------------------------------------
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
# ---------------------------------- Network -----------------------------------
network.host: 0.0.0.0
# --------------------------------- Discovery ----------------------------------
discovery.seed_hosts: ["172.168.13.208", "172.168.13.209"]
cluster.initial_master_nodes: ["master","node-1"]
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
http.cors.enabled: true
http.cors.allow-origin: "*"
# ---------------------------------- Cluster -----------------------------------
cluster.name: elk
# ------------------------------------ Node ------------------------------------
node.name: node-1
# ----------------------------------- Paths ------------------------------------
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
# ---------------------------------- Network -----------------------------------
network.host: 0.0.0.0
# --------------------------------- Discovery ----------------------------------
discovery.seed_hosts: ["172.168.13.208", "172.168.13.209"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["master", "node-1"]
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
http.cors.enabled: true
http.cors.allow-origin: "*"