Elasticsearch kibana logstash 安装x-pack 插件

1.ES 安装x-pack插件

(离线安装请参考官方文档)官方文档在此

先停止es进程,进入es目录 ,运行命令bin/elasticsearch-plugin install x-pack ,安装过程如下

[es@elk elasticsearch-6.2.2]$ bin/elasticsearch-plugin install x-pack
-> Downloading x-pack from elastic
[=================================================] 100%   
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.io.FilePermission \\.\pipe\* read,write
* java.lang.RuntimePermission accessClassInPackage.com.sun.activation.registries
* java.lang.RuntimePermission getClassLoader
* java.lang.RuntimePermission setContextClassLoader
* java.lang.RuntimePermission setFactory
* java.net.SocketPermission * connect,accept,resolve
* java.security.SecurityPermission createPolicy.JavaPolicy
* java.security.SecurityPermission getPolicy
* java.security.SecurityPermission putProviderProperty.BC
* java.security.SecurityPermission setPolicy
* java.util.PropertyPermission * read,write
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@        WARNING: plugin forks a native controller        @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
This plugin launches a native controller that is not subject to the Java
security manager nor to system call filters.

Continue with installation? [y/N]y
-> Installed x-pack with: x-pack-core,x-pack-ml,x-pack-graph,x-pack-upgrade,x-pack-deprecation,x-pack-logstash,x-pack-security,x-pack-monitoring,x-pack-watcher

安装成功后可以启动es: bin/elasticsearch
使用命令 :bin/x-pack/setup-passwords interactive 分别修改 elastic, kibana, 和 logstash_system 这三个用户的密码。

2.kibana 安装x-pack

(离线安装参考官方文档)官方文档在此
同样先停止kibana进程,进入kibana目录,运行命令:bin/kibana-plugin install x-pack 安装插件
插件安装比较慢,耐心等待

[root@elk kibana]# bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-6.2.2.zip
Transferring 269704442 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete

修改kibana的配置文件 kibana.yml 添加上如下配置:

elasticsearch.username: "kibana"
elasticsearch.password: "kibanapassword"

这里的kibana的用户名以及密码,是刚刚上文设置的。
重新启动kibana,完成 bin/kibana
启动后,会看到几条报错 :

[warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
[warning][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
[warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.

根据第一条报错,添加如下配置到kibana.yml
xpack.security.encryptionKey: "something_at_least_32_characters"
xpack.reporting.encryptionKey: "a_random_string"

第二条报错,应该是没有SSL配置造成的,根据官方文档配置好SSL的配置就应该可以了

官方文档配置参考点击这里

Elasticsearch kibana logstash 安装x-pack 插件_第1张图片

Elasticsearch kibana logstash 安装x-pack 插件_第2张图片

你可能感兴趣的:(kibana,Elasticsearch)