Debian/Ubuntu
개요
이 섹션에서는 Debian/Ubuntu용 공식 Zabbix 패키지를 사용하여 Zabbix 7.2.x에서 최신 Zabbix 7.4.x 버전으로 업그레이드하는 방법을 설명합니다.
업그레이드하기 전에 관련 업그레이드 참고 사항을 검토하고 시스템이 Zabbix 7.4의 요구 사항을 충족하는지 확인하십시오.
업그레이드 중에 두 개의 SSH 세션을 병렬로 실행하는 것이 좋습니다. 하나는 업그레이드 단계를 수행하는 데 사용하고, 다른 하나는 서버/프록시 로그를 모니터링하는 데 사용합니다.
예를 들어 두 번째 세션에서 tail -f zabbix_server.log 또는 tail -f zabbix_proxy.log를 실행하면 최신 로그 항목과 발생 가능한 오류를 실시간으로 확인할 수 있습니다.
이는 프로덕션 인스턴스에서 매우 중요할 수 있습니다.
Zabbix 7.4.x 마이너 버전 간(예: 7.4.1에서 7.4.3으로) 업그레이드하는 방법은 마이너 버전 간 업그레이드를 참조하십시오.
업그레이드 절차
1 Zabbix 프로세스 중지
데이터베이스에 새 데이터가 삽입되지 않도록 Zabbix 서버를 중지합니다.
systemctl stop zabbix-server
Zabbix 프록시, 에이전트 또는 에이전트 2를 업그레이드하는 경우 해당 구성 요소도 중지합니다.
systemctl stop zabbix-proxy
systemctl stop zabbix-agent
systemctl stop zabbix-agent2
2 Zabbix 데이터베이스 백업
업그레이드 실패(예: 디스크 공간 문제, 정전 또는 예기치 않은 문제)에 대비하여 기존 Zabbix 데이터베이스를 백업합니다.
3 Zabbix 구성 파일, PHP 파일 및 Zabbix 바이너리 백업
기존 Zabbix 구성 파일, PHP 파일 및 Zabbix 바이너리를 백업합니다.
구성 파일을 백업하려면 다음을 실행합니다.
mkdir /opt/zabbix-backup/
cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
# For Apache:
cp /etc/apache2/conf-enabled/zabbix.conf /opt/zabbix-backup/
# For Nginx:
cp /etc/nginx/conf.d/zabbix.conf /opt/zabbix-backup/
cp /etc/zabbix/nginx.conf /opt/zabbix-backup/
PHP 파일과 Zabbix 바이너리를 백업하려면 다음을 실행합니다.
cp -R /usr/share/zabbix/ /opt/zabbix-backup/
cp -R /usr/share/zabbix-* /opt/zabbix-backup/
4 저장소 구성 패키지 업데이트
업그레이드를 진행하기 전에 현재 Zabbix 저장소 패키지를 제거합니다.
rm -Rf /etc/apt/sources.list.d/zabbix.list
업그레이드 과정에서 패키지 관리자가 오래된 버전을 재사용하지 않도록 새 패키지를 다운로드하기 전에 작업 디렉터리에서 기존 Zabbix 패키지를 수동으로 제거해야 할 수도 있습니다(예: rm zabbix-release_latest+debian12_all.deb).
그런 다음 최신 패키지와의 호환성을 보장하고 최근 보안 패치 또는 버그 수정을 포함하도록 최신 저장소 구성 패키지를 설치합니다.
Debian 13에서는 다음을 실행합니다.
wget https://repo.zabbix.com/zabbix/8.0/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian13_all.deb
dpkg -i zabbix-release_latest+debian13_all.deb
Debian 12에서는 다음을 실행합니다.
wget https://repo.zabbix.com/zabbix/7.4/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
dpkg -i zabbix-release_latest+debian12_all.deb
이전 Debian 버전에서는 위 링크를 Zabbix 저장소의 올바른 링크로 바꾸십시오. 단, 해당 버전용 패키지에는 일부 Zabbix 구성 요소가 포함되지 않을 수 있으므로 이러한 구성 요소를 패키지로 업그레이드하려면 OS 업그레이드를 고려하십시오. 포함된 구성 요소 목록은 Zabbix 패키지를 참조하십시오.
Ubuntu 26.04에서는 다음을 실행합니다.
wget https://repo.zabbix.com/zabbix/8.0/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu26.04_all.deb
dpkg -i zabbix-release_latest+ubuntu26.04_all.deb
Ubuntu 24.04에서는 다음을 실행합니다.
wget https://repo.zabbix.com/zabbix/7.4/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu24.04_all.deb
dpkg -i zabbix-release_latest+ubuntu24.04_all.deb
Ubuntu 22.04에서는 다음을 실행합니다.
wget https://repo.zabbix.com/zabbix/7.4/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu22.04_all.deb
dpkg -i zabbix-release_latest+ubuntu22.04_all.deb
이전 Ubuntu 버전에서는 위 링크를 Zabbix 저장소의 올바른 링크로 바꾸십시오. 단, 해당 버전용 패키지에는 일부 Zabbix 구성 요소가 포함되지 않을 수 있으므로 이러한 구성 요소를 패키지로 업그레이드하려면 OS 업그레이드를 고려하십시오. 포함된 구성 요소 목록은 Zabbix 패키지를 참조하십시오.
Zabbix 저장소 구성에 관한 메시지가 표시될 수 있습니다.
Configuration file '/etc/apt/sources.list.d/zabbix.list'
==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** zabbix.list (Y/I/N/O/D/Z) [default=N] ?
Zabbix 저장소 구성의 패키지 관리자 버전을 설치하려면 Y(또는 I)를 입력합니다.
그런 다음 저장소 정보를 업데이트합니다.
apt update
5 Zabbix 구성 요소 업그레이드
Zabbix 구성 요소를 업그레이드하려면 다음을 실행합니다.
apt install --only-upgrade zabbix-server-mysql zabbix-frontend-php zabbix-agent
- PostgreSQL을 사용하는 경우 명령에서
mysql을pgsql로 바꾸십시오. - 프록시를 업그레이드하는 경우 명령에서
server를proxy로 바꾸십시오. - Zabbix 에이전트 2를 업그레이드하는 경우 명령에서
zabbix-agent를zabbix-agent2 zabbix-agent2-plugin-*로 바꾸십시오.
apt install zabbix-agent2 명령으로 Zabbix 에이전트 2를 업그레이드하면 오류가 발생할 수 있습니다.
자세한 내용은 알려진 문제를 참조하십시오.
Zabbix 서버(또는 프록시) 구성에 관한 메시지가 표시될 수 있습니다.
Configuration file '/etc/zabbix/zabbix_server.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** zabbix_server.conf (Y/I/N/O/D/Z) [default=N] ?
상황에 가장 적합한 옵션을 입력하십시오.
예를 들어 현재 구성과 새 구성을 비교하려면 D를 입력한 후 패키지 관리자 버전(Y 또는 I)을 설치할지 결정합니다.
그런 다음 Zabbix 프런트엔드를 업그레이드하고 웹 서버를 다시 시작합니다.
Apache에서는 다음을 실행합니다.
apt install zabbix-apache-conf
systemctl restart apache2
Nginx에서는 다음을 실행합니다.
apt install zabbix-nginx-conf
systemctl restart nginx
Nginx에서는 nginx.conf 구성 파일에 관한 메시지가 표시될 수 있습니다. 상황에 가장 적합한 옵션을 입력하십시오.
Configuration file '/etc/zabbix/nginx.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** nginx.conf (Y/I/N/O/D/Z) [default=N] ?
6 구성 요소 구성 매개변수 검토
관련 업그레이드 참고 사항을 검토하여 구성 매개변수를 변경해야 하는지 확인하십시오.
새로운 선택적 매개변수는 새로운 기능 페이지를 참조하십시오.
Nginx를 웹 서버로 사용하고 업그레이드 중에 /etc/zabbix/nginx.conf 구성 파일을 다시 설치한 경우, 파일을 검토하고 listen 및 server_name 지시문을 Zabbix 프런트엔드 구성에 맞게 업데이트하십시오.
7 Zabbix 프로세스 시작
업그레이드된 Zabbix 구성 요소를 시작합니다.
systemctl start zabbix-server
systemctl start zabbix-proxy
systemctl start zabbix-agent
systemctl start zabbix-agent2
8 웹 브라우저 쿠키 및 캐시 지우기
업그레이드 후 Zabbix 웹 인터페이스가 제대로 작동하도록 웹 브라우저 쿠키와 캐시를 지워야 할 수 있습니다.
마이너 버전 간 업그레이드
Zabbix 7.4.x 마이너 버전 간(예: 7.4.1에서 7.4.3으로) 업그레이드할 수 있습니다.
먼저 저장소 정보를 업데이트합니다.
apt update
그런 다음 모든 Zabbix 구성 요소를 업그레이드하려면 다음을 실행합니다.
apt install --only-upgrade 'zabbix*'
- Zabbix 서버만 업그레이드하려면 명령에서
'zabbix*'를'zabbix-server*'로 바꾸십시오. - Zabbix 프록시만 업그레이드하려면 명령에서
'zabbix*'를'zabbix-proxy*'로 바꾸십시오. - Zabbix 에이전트만 업그레이드하려면 명령에서
'zabbix*'를'zabbix-agent*'로 바꾸십시오. - Zabbix 에이전트 2만 업그레이드하려면 명령에서
'zabbix*'를'zabbix-agent2*'로 바꾸십시오.