转载请注明出处:
1.通过安装包安装
1.使用以下命令下载安装包:
wget https://dl.influxdata.com/kapacitor/releases/kapacitor_1.6.3-1_amd64.deb
然后,运行以下命令来安装下载的包:
sudo dpkg -i kapacitor_1.6.3-1_amd64.deb
2.安装完成后,现在启用Kapacitor(系统启动时自动启动),启动并使用以下命令验证状态:
sudo systemctl start kapacitor sudo systemctl enable kapacitor sudo systemctl status kapacitor
3.要验证Kapacitor版本,请使用以下命令进行确认:
kapacitor version
4.修改配置
Kapacitor的配置文件是TOML格式的,默认保存在/etc/kapacitor/kapacitor.conf
。如果您将配置文件保存在其他位置,启动Kapacitor时需要指定该位置。
修改完成后,需要重启kapacitor服务。
sudo systemctl restart kapacitor
2.通过docker compose 进行安装
使用docker compose编排服务:
version: '3.6' services: kapacitor: image: kapacitor:1.6.3 environment: - TZ=Asia/Shanghai volumes: - type: bind source: /var/data/kapacitor/kapacitor.db target: /var/lib/kapacitor/kapacitor.db - type: bind source: /var/data/kapacitor/kapacitor.conf target: /etc/kapacitor/kapacitor.conf ports: - published: 9092 target: 9092 mode: host logging: driver: "json-file" options: max-file: "5" max-size: "20m"
启动服务:
docker-compose -f /var/data/kapacitor/docker-compose.yml up -d
停止服务:
docker-compose -f /var/data/kapacitor/docker-compose.yml down
标签:compose,sudo,kapacitor,systemctl,linux,var,docker,安装 From: https://www.cnblogs.com/zjdxr-up/p/17904927.html