elk7.x开启安全配置

1.使用如下命令生成证书

./bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass ""

2.在elasticsearch.yml文件中添加以下几条

xpack.security.enabled: true #开启安全策略

xpack.security.transport.ssl.enabled: true #开启ssl策略,安全策略为true,这一条就必须为true不然会报错

xpack.security.transport.ssl.verification_mode: certificate

xpack.security.transport.ssl.keystore.path: elastic-certificates.p12

xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

启动elasticsearch查看有无报错 注:如没有使用证书则会出现java的错误

3.使用如下命令生成密码

./bin/elasticsearch-setup-passwords auto

4.在kibana中设置登陆密码

elasticsearch.username: "kibana"

elasticsearch.password: "生成密码"

注!!!在kibana登陆界面中输入的是elastic的用户名密码

你可能感兴趣的:(linux,elk)