ubuntu 安装 filebeat
1) 打开终端(Terminal), 添加 Elastic 的 APT 包源。运行以下命令来导入 Elastic 的 PGP 密钥:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
2) 添加 Elastic APT 包源到 APT 源列表中。根据您使用的 Ubuntu 版本,选择以下其中一个命令来添加 Elastic APT 包源:
# 对于 Ubuntu 20.04(Focal):
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
3) apt 安装 filebeat
sudo apt update && sudo apt install -y filebeat
备注
在使用 sudo apt install -y filebeat
安装 Filebeat 后,相关的文件和目录如下:
- 主配置文件:
/etc/filebeat/filebeat.yml
- 模块配置文件目录:
/etc/filebeat/modules.d
- 系统服务文件:
/etc/systemd/system/filebeat.service
本作品采用《CC 协议》,转载必须注明作者和本文链接