1. Elasticsearch部署java
Elasticsearch首先須要Java環境,因此須要提早安裝好JDK,能夠直接使用yum安裝。也能夠從Oracle官網下載JDK進行安裝。開始以前要確保JDK正常安裝而且環境變量也配置正確:
2. 安裝JDK
node
[root@linux-node1 ~]# rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm [root@linux-node1 ~]# yum install -y java [root@linux-node1 ~]# java -version openjdk version "1.8.0_65" OpenJDK Runtime Environment (build 1.8.0_65-b17) OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
3. 安裝elasticSearchlinux
1) 下載並安裝GPG key
vim
[root@elk-1 ~]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
2) 添加yum倉庫centos
[root@elk-1 ~]# vim /etc/yum.repos.d/elasticsearch.repo [root@elk-1 ~]# cat /etc/yum.repos.d/elasticsearch.repo [elasticsearch-2.x] name=Elasticsearch repository for 2.x packages baseurl=http://packages.elastic.co/elasticsearch/2.x/centos gpgcheck=1 gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch enabled=1
3) 安裝elasticsearchoracle
[root@elk-1 ~]# yum install -y elasticsearch
4. 安裝logstash部署與配置
和elasticsearch同樣,在開始部署logStash以前也須要你的環境中正確的安裝的jdk。能夠下載安裝oracle的jdk或者使用yum安裝openjdk
1) 安裝JDK
elasticsearch
[root@linux-node1 ~]# rpm -ivh https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm [root@linux-node1 ~]# yum install -y java [root@linux-node1 ~]# java -version openjdk version "1.8.0_65" OpenJDK Runtime Environment (build 1.8.0_65-b17) OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
2) 下載並安裝GPG key
ui
[root@elk-1 ~]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
3) 添加yum倉庫
url
[root@elk-1 ~]# vim /etc/yum.repos.d/logstash.repo [root@elk-1 ~]# cat /etc/yum.repos.d/logstash.repo [logstash-2.3] name=Logstash repository for 2.3.x packages baseurl=https://packages.elastic.co/logstash/2.3/centos gpgcheck=1 gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch enabled=1
4) 安裝logstash
spa
[root@elk-1 ~]# yum install -y logstash
5. kibana 簡介
kibana是爲elasticsearch設計的開源分析和可視化平臺。你能夠使用kibana來搜索,查看存儲在elasticsearch索引中的數據並與之交互。你能夠很容易實現高級的數據分析和可視化,以圖表的形式展示出來。
1) 下載並安裝GPG key
[root@elk-1 ~]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
2) 添加yum倉庫
[root@elk-1 ~]# vim /etc/yum.repos.d/kibana.repo [root@elk-1 ~]# cat /etc/yum.repos.d/kibana.repo [kibana-4.5] name=Kibana repository for 4.5.x packages baseurl=http://packages.elastic.co/kibana/4.5/centos gpgcheck=1 gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch enabled=1
3) 安裝kibana
[root@elk-1 ~]# yum install -y kibana