前提准备
安装kibana-6.7.0: 《Elasticsearch-6.7.0系列(三)5601端口 kibana——ES的UI界面》
升级前ES的license
升级之前访问:http://192.168.10.110:9200/_xpack 其中security一项内容如下:
security description "Security for the Elastic Stack" available false enabled true
在kibana中升级license
在 Kibana 中访问 Management -> Elasticsearch -> License Management,点击右侧的升级 License 按钮,可以免费试用 30 天的高级 License,升级完成之后kibana页面会显示如下:
修改ES配置文件
elasticsearch-6.7.0/config/elasticsearch.yml 添加如下配置:
xpack.security.enabled: true xpack.ml.enabled: true xpack.license.self_generated.type: trial //表示试用的意思
设置集群密码
./bin/elasticsearch-setup-passwords interactive 设置集群密码:
总共修改了6个用户的密码:elastic、kibana、apm_system、logstash_system、beats_system、remote_monitoring_user。
修改配置之后,记得重启ES!!! 以及,kibana!!!
ES集群访问试用密码
此时访问ES: http://192.168.10.110:9200 需要用户名和密码了:
再访问http://192.168.10.110:9200/_xpack 其中security一项内容如下:
security description "Security for the Elastic Stack" available true //已经从false变为true了,表示security设置成功 enabled true