ELK元件安裝
1、導入官網秘鑰
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
2、向elasticsearch.repo檔案添加安裝所需内容
(這裡安裝7.x是軟體版,7.x為目前最新,如有需要可更改其他老版本如:6.x)
cat>/etc/yum.repos.d/elasticsearch.repo<<EOF
[elasticsearch-7.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
4、清除yum緩存
yum clean all
5、安裝elasticsearch logstash kibana三個元件
yum install elasticsearch logstash kibana -y
6、配置檔案存放目錄
cd /etc/logstash/
cp logstash-sample1.conf logstash.conf
7、啟用服務
systemctl start logstash
systemctl start elasticsearch
systemctl start kibana