1. 下载elk安装包

    [root@k8smaster1 ~]# ls
    elasticsearch-5.5.2.rpm  kibana-5.5.2-x86_64.rpm  logstash-5.5.2.rpm

2. 安装elk安装包

   [root@k8smaster1 ~]# rpm -ivh logstash-5.5.2.rpm 
warning: logstash-5.5.2.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:logstash-1:5.5.2-1               ################################# [100%]
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME.
warning: %post(logstash-1:5.5.2-1.noarch) scriptlet failed, exit status 1
[root@k8smaster1 ~]# rpm -ivh elasticsearch-5.5.2.rpm 
warning: elasticsearch-5.5.2.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing...                          ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Updating / installing...
   1:elasticsearch-0:5.5.2-1          ################################# [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
[root@k8smaster1 ~]# rpm -ivh kibana-5.5.2-x86_64.rpm 
warning: kibana-5.5.2-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:kibana-5.5.2-1                   ################################# [100%]

3. 修改elasticsearch配置

[root@k8smaster1 ~]# cat /etc/elasticsearch/elasticsearch.yml 
network.host: 10.10.10.11
http.port: 9200

4.  启动服务

     systemctl daemon-reload 
     systemctl enable elasticsearch.service
     systemctl start elasticsearch.service
     systemctl status elasticsearch.service
     netstat -nltp|grep 9200

5. 测试Elasticsearch

[root@k8smaster1 ~]# curl 10.10.10.11:9200
{
  "name" : "mEApsAX",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "QD88SzdFQjyFJrkQqTsCjw",
  "version" : {
    "number" : "5.5.2",
    "build_hash" : "b2f0c09",
    "build_date" : "2017-08-14T12:33:14.154Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}

6. 修改kibana配置文件

[root@k8smaster1 ~]# cat /etc/kibana/kibana.yml 
server.host: "10.10.10.11"
elasticsearch.url: "http://10.10.10.11:9200"

7. 启动kibana

   systemctl start kibana
   systemctl enable kibana
   systemctl status kibana
   netstat -ntlp|grep 5601

8. 测试



Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐