Docker部署ELK 设置es和kibana密码
elk版本为7.9.2 (书接上回 docker部署elk)
进入容器
docker exec -ti elk /bin/sh
新增xpack配置,补充到最后
vim /etc/elasticsearch/elasticsearch.yml
xpack.security.transport.ssl.enabled: true xpack.security.enabled: true http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: "Authorization"
# 重启es
service elasticsearch restart
设置密码,为了记录,统一设置为了123456
/opt/elasticsearch/bin/elasticsearch-setup-passwords interactive
Enter password for [elastic]: Reenter password for [elastic]: Enter password for [apm_system]: Reenter password for [apm_system]: Enter password for [kibana_system]: Reenter password for [kibana_system]: Enter password for [logstash_system]: Reenter password for [logstash_system]: Enter password for [beats_system]: Reenter password for [beats_system]: Enter password for [remote_monitoring_user]: Reenter password for [remote_monitoring_user]: Changed password for user [apm_system] Changed password for user [kibana_system] Changed password for user [kibana] Changed password for user [logstash_system] Changed password for user [beats_system] Changed password for user [remote_monitoring_user] Changed password for user [elastic]
# 设置kibana配置
vim /opt/kibana/config/kibana.yml
找到关键词,解除注释并修改账密
elasticsearch.username: "elastic" elasticsearch.password: "123456"
# 重启kibana
service kibana restart