elasticsearch 6.3.0已經(jīng)整合了x-pack因此只要啟用就可了挑格,下面是啟用步驟
啟用trial license(30天試用)
curl -H "Content-Type:application/json" -XPOST http://localhost:9200/_xpack/license/start_trial?acknowledge=true
配置elasitcsearch.yml
xpack.security.enabled: true
啟動(dòng)elasticsearch
./bin/elasticsearch
設(shè)置密碼
li@li-ok:~/elasticsearch-6.3.0$ ./bin/elasticsearch-setup-passwords interactive
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system,beats_system.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y
Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
在kibana中配置elasticsearch的用戶信息
在kibana.yml中配置,如果沒有安裝kibana可以忽略
elasticsearch.username: "elastic"
elasticsearch.password: 之前設(shè)置的elastic的密碼
重新啟動(dòng)elasticsearch漱挚、kibana
啟動(dòng)完成之后訪問kibana
深度截圖_選擇區(qū)域_20180902130655.png