02 Zabbix Agent 설치
버전 확인 및 결정
Zabbix Server 버전과 동일한 것 추천
https://repo.zabbix.com/zabbix
지원 리눅스 배포판 확인
웹브라우저 방문
https://repo.zabbix.com/zabbix/<zabbix-version>/release/
https://repo.zabbix.com/zabbix/7.2/release/
- alma
- amazonlinux
- centos
- debian
- oracle
- raspbian
- rhel
- rocky
- sles
- ubuntu
레포 추가
원하는 Zabbix 버전의 원하는 배포판의 목록으로 이동
ubuntu
https://repo.zabbix.com/zabbix/<zabbix-version>/release/<linux-dist>/pool/main/z/zabbix-release/
https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/
파일 URL 확인, 다운로드, 레포 등록 - zabbix-release_<zabbix-version>+ubuntu<version>_all.deb
wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.2-1+ubuntu24.04_all.deb dpkg -i zabbix-release*all.deb apt update
centos
https://repo.zabbix.com/zabbix/<zabbix-version>/release/centos/<centos-version>/noarch/
https://repo.zabbix.com/zabbix/7.2/release/centos/9/noarch/
파일 URL 확인, 다운로드, 레포 등록 - zabbix-release-<zabbix-version>.el<version>.noarch.rpm
yum -y install https://repo.zabbix.com/zabbix/7.2/release/centos/9/noarch/zabbix-release-7.2-1.el9.noarch.rpm
rorky
https://repo.zabbix.com/zabbix/<zabbix-version>/release/centos/<rocky-version>/noarch/
https://repo.zabbix.com/zabbix/7.2/release/rocky/9/noarch/
파일 URL 확인, 다운로드, 레포 등록 - zabbix-release-<zabbix-version>.el<version>.noarch.rpm
yum -y install https://repo.zabbix.com/zabbix/7.2/release/rocky/9/noarch/zabbix-release-7.2-1.el9.noarch.rpm
설치
apt -y install zabbix-agent yum -y install zabbix-agent yum info --disablerepo="*" --enablerepo zabbix zabbix-agent
설정
(설정파일 원본) https://github.com/zabbix/zabbix/blob/master/conf/zabbix_agentd.conf
기타
레포에 따른 다른 설정
레포에 따라 디렉터리 구조와 설정이 가 약간씩 다름
Repo | 기본 설정 | logrotate 설정 |
---|---|---|
/etc/zabbix/zabbix_agentd.conf # cat /etc/zabbix/zabbix_agentd.conf | grep -v '#' | uniq | /etc/logrotate.d/zabbix-agent | |
zabbix.com | PidFile=/run/zabbix/zabbix_agentd.pid | /var/log/zabbix/zabbix_agentd.log { weekly rotate 12 compress delaycompress missingok notifempty create 0640 zabbix zabbix } |
ubuntu.com | PidFile=/run/zabbix/zabbix_agentd.pid | /var/log/zabbix-agent/zabbix_agentd.log { weekly rotate 7 compress delaycompress missingok notifempty create 0640 zabbix zabbix sharedscripts postrotate [ -e /run/zabbix/zabbix_agentd.pid ] && invoke-rc.d zabbix-agent force-reload >/dev/null || true endscript } |
# yum repolist repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS epel Extra Packages for Enterprise Linux 9 - x86_64 extras Rocky Linux 9 - Extras influxdata InfluxData Repository - Stable zabbix Zabbix Official Repository - x86_64 zabbix-release Zabbix Official Repository (release packages) - noarch zabbix-sources Zabbix Official Repository (sources) - x86_64 zabbix-third-party Zabbix Official Repository (third-party) - x86_64 zabbix-tools Zabbix Official Repository (tools) - x86_64 # yum info --disablerepo="*" --enablerepo epel zabbix-agent Last metadata expiration check: 1:21:19 ago on Fri 21 Mar 2025 02:08:59 PM KST. Available Packages Name : zabbix-agent Epoch : 1 Version : 6.0.36 Release : 1.el9 Architecture : x86_64 Size : 294 k Source : zabbix-6.0.36-1.el9.src.rpm Repository : epel Summary : Zabbix agent URL : https://www.zabbix.com License : GPL-2.0-only Description : Zabbix agent, to be installed on monitored systems # yum info --disablerepo="*" --enablerepo zabbix zabbix-agent Last metadata expiration check: 0:05:41 ago on Fri 21 Mar 2025 03:24:43 PM KST. Available Packages Name : zabbix-agent Version : 7.2.4 Release : release1.el9 Architecture : x86_64 Size : 623 k Source : zabbix-7.2.4-release1.el9.src.rpm Repository : zabbix Summary : Zabbix agent URL : http://www.zabbix.com/ License : AGPLv3 Description : Old implementation of zabbix agent. : To be installed on monitored systems.yum
패키지 정보
# apt info zabbix-agent Package: zabbix-agent Version: 1:7.2.4-1+ubuntu22.04 Priority: optional Section: net Source: zabbix Maintainer: Zabbix Packager <info@zabbix.com> Installed-Size: 843 kB
파일 목록
# tree -F /etc/zabbix /etc/zabbix/ ├── zabbix_agentd.conf └── zabbix_agentd.d/