1.在elasticsearch.yml中添加如下配置:
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transprt.ssl.enabled: true
修改完配置之後重啓elasticsearch。
2.執行如下命令:
bin/elasticsearch-setup-passwords interactive
依次設置密碼。
3.在kibana.yml中添加配置:
elasticsearch.username: "elastic"
elasticsearch.password: "xxxx"