1、ES配置文件中開啟x-pack驗證,
修改config目錄下面的elasticsearch.yml文件,在里面添加如下內(nèi)容,并重啟es.文章來源:http://www.zghlxwxcb.cn/news/detail-506728.html
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
2、進入es的安裝根目錄bin下,/usr/share/elasticsearch/bin
執(zhí)行elasticsearch-setup-passwords interactive
設置用戶名和密碼的命令,為以下幾個用戶分別設置密碼,elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.文章來源地址http://www.zghlxwxcb.cn/news/detail-506728.html
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y
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]
3、kibana.yml 中添加:
elasticsearch.username: "elastic"
elasticsearch.password: "xxxx"
4、重啟即可。
到了這里,關于ES修改用戶名和密碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!