官方文档:
https://www.elastic.co/guide/en/x-pack/5.0/installing-xpack.html
- 在集群中的每个节点上运行以下命令
bin/elasticsearch-plugin install x-pack
- 确认给x-pack授予额外的权限
- 修改elasticsearch配置elasticsearch.yml,允许x-pack自动创建索引:
action.auto_create_index: .security,.monitoring,.watches,.triggered_watches,.watcher-history
- 启动elasticsearch
- 在kibana上安装x-pack
bin/kibana-plugin install x-pack
- 启动kibana
- x-pack默认用户及密码:elastic/changeme
- 卸载:
bin/elasticsearch-plugin remove x-pack
bin/kibana-plugin remove x-pack
- 在elasticsearch.yml和kibana.yml上添加配置
#x-pack
xpack.security.enabled: true
xpack.monitoring.enabled: true
xpack.graph.enabled: true
xpack.watcher.enabled: true(只在elasticsearch.yml上配置)
xpack.reporting.enabled: true(只在kibana.yml上配置)
- 修改x-pack密码
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{
"password" : "test123"
}'
确定后,输入原来的密码即可修改成功