Elasticsearch版本号:7.12.1
一.设置用户名密码
1.进入到es的config目录下找到elasticsearch.yml文件添加以下配置
-
xpack.security.enabled: true
-
xpack.license.self_generated.type: basic
-
xpack.security.transport.ssl.enabled: true
2.进入到D:\办公软件\elasticsearch-7.12.1-windows-x86_64\elasticsearch-7.12.1\bin cmd进入
elasticsearch-setup-passwords interactive 执行此命令给
elastic, kibana, logstash_system,beats_system设置密码
设置完成后重启es
最后在application.yml中添加
-
elasticsearch: rest: uris: username: elastic password: ******