赞
踩
#####ES的yml配置文件#####
集群名称
cluster.name: yunsuo
节点名称
node.name: node-2.71
索引数据的存储路径
path.data: /data/es/data
日志文件的存储路径
path.logs: /data/es/logs
锁定内存
bootstrap.memory_lock: true
允许访问地址
network.host: 0.0.0.0
新节点用于加入集群的主节点列表
discovery.seed_hosts: [“10.41.52.82”,“10.41.52.86”,“10.41.52.88”]
集群的初始列表
cluster.initial_master_nodes: [“10.41.52.82”,“10.41.52.86”,“10.41.52.88”]
配置分片数
cluster.max_shards_per_node: 10000
是否为主节点
node.master: true
是否为数据节点
node.data: true
作为搜索器,从节点中获取数据,生成搜索结果
node.ingest: true
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
1、设置xpack.security.enabled: true
2、生成节点证书
1)为Elasticsearch创建一个证书颁发机构。
bin/elasticsearch -certutil ca,
一直回车,会生成一个elastic-stack-ca.p12文件;
2)定期为周期中的节点生成证书和驱动。
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12,
一直回车,会生成一个elastic-certificates.p12文件;
3)每天将生产的证书复制到节点上,如目录为/home/es/config/certs;
3、网络会话节点通信
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificates
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
4、将密码添加到您的Elasticsearch密码库中
bin/elasticsearch-keystore 添加 xpack.security.transport.ssl.keystore.secure_password
bin/elasticsearch-keystore 添加 xpack.security.transport.ssl.truststore.secure_password
5、重启
6、设置所有内置用户的密码。bin/elasticsearch-setup-passwords交互
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。