栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

ElasticSearch学习2:linux 设置 ElasticSearch7.6.1 和 kibana7.6.1 账号密码

ElasticSearch学习2:linux 设置 ElasticSearch7.6.1 和 kibana7.6.1 账号密码

1.生成tls文件加密

bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass ""

运行后 config下会有elastic-certificates.p12这个文件

2.需要在配置文件中开启x-pack验证, 修改config目录下面的elasticsearch.yml文件,在里面添加如下内容

xpack.security.enabled: true

xpack.license.self_generated.type: basic

xpack.security.transport.ssl.enabled: true

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

3,执行设置用户名和密码的命令,这里需要为4个用户分别设置密码,elastic, kibana, logstash_system,beats_system

在es启动的情况下设置密码

bin/elasticsearch-setup-passwords interactive

设置密码的时候可能报错

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
 

看配置文件elasticsearch-.yml里面的Discovery里面有一个
cluster.initial_master_nodes: ["node-1"] 这个的话,

这里的node.name: node-1是上面一个默认的记得打开就可以了
 

 再在浏览器上访问需要输入elastic 的账号和密码可成功进入

elasticsearch总结:很奇怪的是同样的版本7.6.1我们公司的服务器上不需要文件加密,也不报报错下面三个参数再设置密码即可,在阿里云上就不行

xpack.security.enabled: true

xpack.license.self_generated.type: basic

xpack.security.transport.ssl.enabled: true

可能是es被安全漏洞搞怕了吧,公网的安全设置更严

kibana 配置es的账号
#kibana配置相关
server.port: 5601
server.host: "0.0.0.0"
kibana.index: ".kibana"

#elasticsearch账号相关,地址,账号,密码,之前在es设置的
elasticsearch.hosts: ["http://123.456.220.31:9200"]
elasticsearch.username: "elastic"
elasticsearch.password: "123"

启动kibana输入账号密码登录

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/707014.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号