对于ElasticSearch的具体各项配置可以看别人写的ElasticSearch各项配置介绍
集群部署时
机器一
## cluster
cluster.name: "my-es-cluster"
## node
node.name: "node-1"
node.master: true
node.data: true
## network
network.host: 192.168.0.171
transport.tcp.port: 9300
http.port: 9200
## discovery
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: ["192.168.212.61:9300"]
## protection
action.auto_create_index: false
## Path
path.data: /Users/pengys5/server/elasticsearch-5.3.0/data
#
# Path to log files:
#
path.logs: /Users/pengys5/server/elasticsearch-5.3.0/logs
http.cors.enabled: true
http.cors.allow-origin: "*"
thread_pool.bulk.queue_size: 10000
机器二
## cluster
cluster.name: "my-es-cluster"
## node
node.name: "node-2"
node.master: true
node.data: true
## network
network.host: 192.168.212.61
transport.tcp.port: 9300
http.port: 9200
## discovery
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: [ "192.168.0.171:9300"]
## protection
action.auto_create_index: false
## Path
path.data: D:\elasticsearch-5.3.0\data
#
# Path to log files:
#
path.logs: D:\elasticsearch-5.3.0\logs
http.cors.enabled: true
http.cors.allow-origin: "*"
thread_pool.bulk.queue_size: 10000
本文详细介绍了ElasticSearch集群的配置方法,包括两台机器的集群名称设置、节点名称及角色分配、网络配置如主机地址与端口、发现机制如最小主节点数量和ping广播主机、保护措施如自动创建索引开关、数据与日志路径设置等。同时展示了跨机器间的配置协同以及HTTP跨源资源共享设置。

被折叠的 条评论
为什么被折叠?



