最近工作中安裝了es7.8. 我只是安裝使用了。並沒有設置密碼。結果安全掃描到了。需要設置密碼。
so。找到了這篇https://www.chengxulvtu.com/elasticsearch-7-8-enable-password-authentication/
下面也記錄下。
1.在 elasticsearch.yml 中添加如下配置
# 配置X-Pack
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
2.重啟 elasticsearch 服務
systemctl restart elasticsearch
3.設置密碼
./usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive
需要設置 elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user 這些用戶的密碼
設置完就可以了。用戶名是:elastic
好了 玩的開心!
