安装
执行如下命令:
sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
/etc/yum.repos.d/ 文件夹下创建名为elastic.repo的文件,编辑文件内容如下:
[elastic-8.x]
name=Elastic repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
之后执行如下命令安装filebeats:
sudo yum install filebeat
设置filebeats自启动:
sudo systemctl enable filebeat(基予systemd)
或
sudo chkconfig --add filebeat
filebeat配置文件demofilebeat.yml