ElasticSearch6.1.1安装x-pack插件

作者: admin 分类: Elasticsearch 发布时间: 2018-01-22 22:26

X-PACK介绍

https://www.elastic.co/cn/products/x-pack

安装前提

必须先安装好

(1)Elasticsearch6.1.1

(2)Kibana 6.1.1

两者的版本必须保持一致。

下载地址:https://www.elastic.co/downloads

开始安装

1,首先进入Elasticsearch6.1.1安装目录,进行插件安装(Install X-Pack into Elasticsearch)

[elastic@localhost 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
Elasticsearch keystore is required by plugin [x-pack], creating...
-> Installed x-pack

2,启动Elasticsearch服务(Start Elasticsearch)

#临时当前shell启动
[elastic@localhost bin]$ ./elasticsearch
#后台启动
[elastic@localhost bin]$ ./elasticsearch -d 

3,采用auto方式,生成默认的密码(Generate default passwords)

默认生成三个级别的用户的默认密码
(1)elastic 最高权限的用户
(2)kibana
(3)logstash_system

[elastic@localhost bin]$ ./x-pack/setup-passwords auto
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system.
The passwords will be randomly generated and printed to the console.
Please confirm that you would like to continue [y/N]y


Changed password for user kibana
PASSWORD kibana = QDbKySxXF#SnI^+?ghUw

Changed password for user logstash_system
PASSWORD logstash_system = uhO0R@7pSHwVtHufGZC$

Changed password for user elastic
PASSWORD elastic = dCnwQumJ@X&7^_o39%eC

[elastic@localhost bin]$ 

4,在Kibana中安装x-pack(Install X-Pack into Kibana)

[elastic@localhost local]$ cd kibana-6.1.1-linux-x86_64/bin/
[elastic@localhost bin]$ ls
kibana  kibana-keystore  kibana-plugin
[elastic@localhost 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.1.1.zip
Transferring 269804609 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete
[elastic@localhost bin]$ 

注意:这个时间会比较久

5,在Kibana配置文件中config/kibana.yml配置第3步骤生成的用户名和密码(Add credentials to the kibana.yml file)

# 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: "dCnwQumJ@X&7^_o39%eC"

保存,退出。

6,启动Kibana(Start Kibana)

[elastic@localhost config]$ cd ../bin
[elastic@localhost bin]$ ls
kibana  kibana-keystore  kibana-plugin
[elastic@localhost bin]$ nohup ./kibana &  #长期后台运行Kibana
[1] 3574
[elastic@localhost bin]$ nohup: ignoring input and appending output to `nohup.out'

7,使用第5步骤设置的用户名和密码访问Kibana(Start Kibana)

访问地址:http://localhost:5601/

发表评论

电子邮件地址不会被公开。 必填项已用*标注