elasticsearch.yml 项目实战配置

本文介绍了一个Elasticsearch集群的配置细节,包括主节点与从节点的设置、网络参数、安全认证等,强调了高可用性和安全性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

主节点:

cluster.name: online_image_es_pro
node.name: eus-image-design-es-kafka01
path.data: /data/es/data
path.logs: /data/es/logs
path.repo: ["/data/esback"]
bootstrap.memory_lock: true
bootstrap.system_call_filter: false
network.host: 172.30.0.106
http.port: 9200
transport.tcp.port: 9300
node.master: true
node.data: true
discovery.seed_hosts: ["172.30.0.106:9300", "172.30.0.107:9300", "172.30.0.110:9300"]
cluster.initial_master_nodes: ["172.30.0.106"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 1
transport.tcp.compress: true

http.cors.enabled: true
http.cors.allow-origin: "*"


# 以下配置可以减少当es节点短时间宕机或重启时shards重新分布带来的磁盘io读写浪费
discovery.zen.fd.ping_timeout: 300s
discovery.zen.fd.ping_retries: 8
discovery.zen.fd.ping_interval: 30s
discovery.zen.ping_timeout: 180s

# 密码部分的配置最好等集群配置没有问题后再进行
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /usr/local/elk/elasticsearch-7.4.2/config/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /usr/local/elk/elasticsearch-7.4.2/config/elastic-certificates.p12

从节点:

cluster.name: online_image_es_pro
node.name: eus-image-design-es-kafka02
path.data: /data/es/data
path.logs: /data/es/logs
path.repo: ["/data/esback"]
bootstrap.memory_lock: true
bootstrap.system_call_filter: false
network.host: 172.30.0.107
http.port: 9200
transport.tcp.port: 9300
node.master: false
node.data: true
discovery.seed_hosts: ["172.30.0.106:9300", "172.30.0.107:9300", "172.30.0.110:9300"]
cluster.initial_master_nodes: ["172.30.0.106"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 1
transport.tcp.compress: true

http.cors.enabled: true
http.cors.allow-origin: "*"


# 以下配置可以减少当es节点短时间宕机或重启时shards重新分布带来的磁盘io读写浪费
discovery.zen.fd.ping_timeout: 300s
discovery.zen.fd.ping_retries: 8
discovery.zen.fd.ping_interval: 30s
discovery.zen.ping_timeout: 180s

# 密码部分的配置最好等集群配置没有问题后再进行
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /usr/local/elk/elasticsearch-7.4.2/config/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /usr/local/elk/elasticsearch-7.4.2/config/elastic-certificates.p12

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

戴国进

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值