Elasticsearch示例版本:7.9.2
一、设置密码
1.需要在配置文件中开启x-pack验证, 修改config目录下面的elasticsearch.yml文件,在里面添加如下内容,并重启es.
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
2,进入es的安装根目录bin下,E:\software\es\elasticsearch-7.9.2\bin
执行设置用户名和密码的命令,这里需要为4个用户分别设置密码,elastic, kibana, logstash_system,beats_system
elasticsearch-setup-passwords interactive
Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [elastic]
3:将kibana.yml添加:
elasticsearch.username: "elastic"
elasticsearch.password: "xxxx"
4,重启即可。
5,修改密码时,将第一步配置删除,然后重启es,将.security-7的索引删除即可。文章来源:https://www.toymoban.com/news/detail-509809.html
然后重新1-4步骤。文章来源地址https://www.toymoban.com/news/detail-509809.html
到了这里,关于ES设置用户名和密码的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!