elasticsearch.yml
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
需要为4个用户分别设置密码:elastic、kibana、logstash_system、beats_system
1.进入bin目录
cd /usr/local/elasticsearch-7.2.0/bin
2.执行命令
./elasticsearch-setup-passwords interactive
1.打开cmd
2.进入bin目录
3.执行命令
elasticsearch-setup-passwords interactive
参考链接:
https://www.cnblogs.com/xhq1024/p/12844654.html
https://blog.csdn.net/q283614346/article/details/120698788
https://zhuanlan.zhihu.com/p/447155597