在Ubuntu系统上安装filebeat
1. 添加ElasticSearch的GPG密钥
bash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
2. 添加ElasticSearch的APT存储库
bash
echo "deb https://artifacts.elastic.co/packages/oss-8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list
3. 更新APT软件包索引
bash
sudo apt update
4. 安装filebeat
bash
sudo apt install filebeat
5. 配置filebeat
bash
sudo vim /etc/filebeat/filebeat.yml
# 根据需求修改配置
6. 启动filebeat
bash
sudo systemctl enable filebeat
sudo systemctl start filebeat