尋找需要的 Beats
Beats 安裝來源設定
如果有網路環境,可以將 repo 來源新增至 yum 中,所以:
cat > /etc/yum.repos.d/elastic.repo << EOF
[elasticsearch-7.x]
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=1
autorefresh=1
type=rpm-md
EOF
離線環境中,先將下載成 rpm 檔,並 scp 至欲安裝的 Server,所以:
Metricbeat:
curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.12.0-x86_64.rpm
Filebeat:
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.12.0-x86_64.rpm
Packetbeat:
curl -L -O https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.12.0-x86_64.rpm
Beat 安裝
具有網路環境可直接安裝,所以:
Metricbeat:
sudo yum install metricbeat
Filebeat:
sudo yum install filebeat
Packetbeat:
sudo yum install packetbeat
無網路環境,則透過 rpm 安裝,所以:
Metricbeat
rpm -ivh metricbeat-7.12.0-x86_64.rpm
Filebeat
rpm -ivh filebeat-7.12.0-x86_64.rpm
Packetbeat:
rpm -vi packetbeat-7.12.0-x86_64.rpm
啟動 Beat
Metricbeat
systemctl start metricbeat
Filebeat
systemctl start filebeat
Packetbeat
systemctl start packetbeat
開機 Beat 自動啟動
Metricbeat
systemctl enable metricbeat
Filebeat
systemctl enable filebeat
Packetbeat
systemctl enable packetbeat
繼續安裝 Logstash、Elasticsearch、Kibana
有任何問題,或是想看新主題?
聯絡我們