1、官方文档:https://www.elastic.co/guide/en/x-pack/current/index.html
2、Install X-Pack into Elasticsearch
- bin/elasticsearch-plugin install x-pack
3、Start Elasticsearch
- bin/elasticsearch
4、Install X-Pack into Kibana
- bin/kibana-plugin install x-pack
5、Start Kibana
- bin/kibana
6、初始用户名密码
Navigate to Kibana at http://localhost:8601/. Log in as the built-in elastic user with the password changeme. (说白了就是初始用户名为elastic,密码为changeme)
7、修改密码
修改elasticsearch密码:
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{
"password" : "elastic"
}'
修改kibana密码:修改之前需要在kibana.yml中配置elasticsearch的用户名和密码后才能需改密码,否则会报错。
# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "elastic"
elasticsearch.password: "your password"
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/kibana/_password' -d '{
"password" : "kibana"
}'
8、角色控制
kibana_user
and monitoring_user
roles.
curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/events_admin' -d '{
"indices" : [
{
"names" : [ "events*" ],
"privileges" : [ "all" ]
},
{
"names" : [ ".kibana*" ],
"privileges" : [ "manage", "read", "index" ]
}
]
}'
curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/jack' -d '{
"password" : "123456",
"full_name" : "jack",
"email" : "jack@163.com",
"roles" : [ "events_admin" ]
}'
9、重置密码:https://www.elastic.co/guide/en/x-pack/current/security-api-users.html#security-api-reset-user-password
10、Enabling Anonymous Access
Incoming requests are c