当前位置: 首页 > news >正文

Elasticsearch3节点集群配置账号密码安全验证

Elasticsearch3节点集群配置账号密码安全验证

ES配置文件

root@node1:~# grep -Ev "^#|^$" /etc/elasticsearch/elasticsearch.yml 
cluster.name: es-pre
node.name: node1
node.master: true
node.data: true
path.data: /data/elk/es/data
path.logs: /data/elk/es/logs
network.host: esIP
http.port: 9200
discovery.seed_hosts: ["node1", "node2", "node3"]
cluster.initial_master_nodes: ["node1", "node2", "node3"]
http.cors.enabled: true
http.cors.allow-origin: "*"
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true
root@node1:~# 

生成CA证书

/usr/share/elasticsearch/bin/elasticsearch-certutil ca
/usr/share/elasticsearch/bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12

拷贝证书文件到es节点目录

mv ./elastic-certificates.p12 /etc/elasticsearch

拷贝证书到es节点并授权

scp /etc/elasticsearch/elastic-certificates.p12   node3:/etc/elasticsearch/
scp /etc/elasticsearch/elastic-certificates.p12   node2:/etc/elasticsearch/chown elasticsearch.elasticsearch /etc/elasticsearch/elastic-certificates.p12 

拷贝es配置文件到es节点

scp /etc/elasticsearch/elasticsearch.yml node2:/etc/elasticsearch/
scp /etc/elasticsearch/elasticsearch.yml node3:/etc/elasticsearch/

三个节点启动ES

systemctl restart elasticsearch.service

登录任一节点设置密码

/usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive#需要设置密码的用户apm_systemkibana_systemkibanalogstash_systembeats_systemremote_monitoring_userelastic

配置kibana

root@node1:~# grep -Ev "^#|^$" /etc/kibana/kibana.yml 
server.port: 5601
server.host: "kibanaIP"
server.publicBaseUrl: "http://kibanaIP"
elasticsearch.hosts: ["http://esIP:9200","http://esIP:9200","http://esIP:9200"]
elasticsearch.username: "kibana_system"
elasticsearch.password: "Your@Passw0rd"
i18n.locale: "zh-CN"
http://www.lryc.cn/news/120860.html

相关文章:

  • ffmepg滤镜
  • Linux 基础(六)常用命令 - find locate which whereis gzip gunzip tar
  • 【Ajax】回调地狱解决方法
  • 解决Vue根组件设置transition失效的问题
  • 【剑指 Offer 40】最小的k个数
  • vue3+vite在main.ts文件中引入./App.vue报错(./App.vue不是模块)
  • 【LeetCode】102. 二叉树的层序遍历、107. 二叉树的层序遍历 II
  • HTML详解连载(2)
  • qt事件系统源码-----定时器
  • 【Android】ViewBinding+DataBinding+MVVM新手快速上手
  • 生成式人工智能模型:提升营销分析用户体验
  • 【并发编程】无锁环形队列Disruptor并发框架使用
  • 【C语言】初阶指针详解
  • ElasticSearch:项目实战(1)
  • React 实现文件分片上传和下载
  • 2023.8.13
  • kvm not all arguments converted during string
  • JVM 基础
  • 智谷星图赵俊:让人才和区块链产业“双向奔赴”丨对话MVP
  • C# Equals()方法报错:NullReferenceException was unhandled
  • Linux下C语言调用libcurl库获取天气预报信息
  • “深入解析JVM:Java虚拟机原理和内部结构“
  • Arrays.asList() 返回的list不能add,remove
  • 命令执行漏洞
  • Hive 中 sort by 和 order by 的区别
  • 网络资源利用最大化:爬虫带宽优化解决方案
  • STDF - 基于 Svelte 和 Tailwind CSS 打造的移动 web UI 组件库,Svelte 生态里不可多得的优秀项目
  • C语言一些有趣的冷门知识
  • Oracle数据库审计
  • Node.js新手在哪儿找小项目练手?