# filebeat 快速安装



<pre class="language-bash"><code class="lang-bash">rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

cat > /etc/yum.repos.d/elasticsearch.repo &#x3C;&#x3C; EOF
[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
EOF



<strong># 安装指定版本
</strong>
yum install  --enablerepo=elasticsearch filebeat-7.8.0 -y



# 编辑配置
vi /etc/filebeat/filebeat.yml

# 启动
systemctl start filebeat &#x26;&#x26; systemctl enable filebeat
</code></pre>
