ELK 安装配置

安装Java

yum -y install java

Import the Elastic PGP Key

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Elasticsearch

Installing from the RPM repository

echo "[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md" > /etc/yum.repos.d/elasticsearch.repo

install Elasticsearch

sudo yum install --enablerepo=elasticsearch elasticsearch 

Download and install the RPM manually

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-x86_64.rpm
sudo rpm --install elasticsearch-7.8.0-x86_64.rpm

Running Elasticsearch with systemd

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service

Kibana

Installing from the RPM repository

echo "[kibana-7.x]
name=Kibana repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md" > /etc/yum.repos.d/kibana.repo

install Kibana

sudo yum install kibana 

Download and install the RPM manually

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.8.0-x86_64.rpm
sudo rpm --install kibana-7.8.0-x86_64.rpm

Run Kibana with systemd

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service
sudo systemctl start kibana.service
sudo systemctl stop kibana.service

Logstash

Installing from the RPM repository

echo "[logstash-7.x]
name=Elastic repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md" > /etc/yum.repos.d/logstash.repo

install Logstash

sudo yum install logstash

Download and install the RPM manually

wget https://artifacts.elastic.co/downloads/logstash/logstash-7.8.0-x86_64.rpm
sudo rpm --install logstash-7.8.0-x86_64.rpm

Run Logstash with systemd

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable logstash.service
sudo systemctl start logstash.service
sudo systemctl stop logstash.service
如果觉得我的文章对你有用,请随意赞赏