Elasticsearch示例版本:7.9.2
一、設(shè)置密碼
1.需要在配置文件中開啟x-pack驗(yàn)證, 修改config目錄下面的elasticsearch.yml文件,在里面添加如下內(nèi)容,并重啟es.
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
2,進(jìn)入es的安裝根目錄bin下,E:\software\es\elasticsearch-7.9.2\bin
執(zhí)行設(shè)置用戶名和密碼的命令,這里需要為4個(gè)用戶分別設(shè)置密碼,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,修改密碼時(shí),將第一步配置刪除,然后重啟es,將.security-7的索引刪除即可。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-509809.html
然后重新1-4步驟。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-509809.html
到了這里,關(guān)于ES設(shè)置用戶名和密碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!