How to Upgrade Zabbix to 5.0.0beta1 on CentOS 7: Step‑by‑Step Guide
This guide walks you through the full upgrade of Zabbix to version 5.0.0beta1 on a CentOS 7 system, covering required PHP and database versions, backup procedures, repository setup, package installation, configuration adjustments, and service restart to ensure a smooth transition.
Upgrade Requirements
Zabbix 5.0.0beta1 requires PHP 7.2 or higher and supports the following database versions: MySQL 5.5.62, MariaDB 10.0.37, PostgreSQL 9.2.24, and Oracle 11.2. Official upgrade documentation can be found at Zabbix 5.0 Upgrade Docs .
System Environment
Operating system: CentOS 7.6 (Core). Nginx version 1.16.1.
# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
# nginx -v
nginx version: nginx/1.16.1Current Zabbix Installation
# rpm -qa | grep zabbix
zabbix-server-mysql-4.2.6-1.el7.x86_64
zabbix-web-mysql-4.2.6-1.el7.noarch
zabbix-get-4.2.6-1.el7.x86_64
zabbix-web-mysql-4.2.6-1.el7.noarch
zabbix-release-4.2-1.el7.noarch
zabbix-agent-4.2.6-1.el7.x86_64Backup Procedures
Backup configuration files :
mkdir /zabbix-backup
cp /etc/zabbix/zabbix_server.conf /zabbix-backup/
cp /etc/zabbix/zabbix_agentd.conf /zabbix-backup/
cp /etc/zabbix/web/zabbix.conf.php /zabbix-backup/
cp -R /usr/share/zabbix/ /zabbix-backup/
cp -R /usr/share/doc/zabbix-* /zabbix-backup/Backup the database (full):
mysqldump -uzabbix -pzabbix@zabbix --opt --skip-lock-tables zabbix | gzip > /opt/zabbix_$(date +%Y%m%d_%H%M%S).sql.gzPartial backup (excluding history tables):
#!/bin/bash
/usr/bin/mysqldump -uzabbix -pzabbix@zabbix zabbix \
--ignore-table=zabbix.history \
--ignore-table=zabbix.history_str \
--ignore-table=zabbix.history_uint \
--ignore-table=zabbix.trends \
--ignore-table=zabbix.trends_uint \
> /opt/zabbix$(date +%y%m%d)-172.18.30.27.sqlUpgrade Steps
1. Stop Zabbix and Nginx services:
systemctl stop zabbix-server && systemctl stop nginx2. Remove old web packages: yum remove zabbix-web-* 3. Install the Red Hat Software Collections (SCL) repository: yum install centos-release-scl 4. Update Zabbix repository packages:
rpm -Uvh https://repo.zabbix.com/zabbix/4.5/rhel/7/x86_64/zabbix-release-4.5-2.el7.noarch.rpm
yum clean all5. Install required SCL packages and Zabbix 5.0.0beta1 front‑end:
yum install zabbix-web-deps-scl-5.0.0beta1.el7.noarch.rpm
yum install zabbix-web-5.0.0beta1.el7.noarch.rpm
yum install zabbix-web-mysql-scl-5.0.0beta1.el7.noarch.rpm
yum install zabbix-nginx-conf-scl-5.0.0beta1.el7.noarch.rpm6. Disable old nginx and php‑fpm services:
systemctl stop nginx php-fpm
systemctl disable nginx php-fpm7. Edit PHP‑FPM configuration (change timezone) at /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf.
8. Edit Nginx configuration to enable listen and server_name in /opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf.
9. Restart and enable the new services:
systemctl restart rh-nginx116-nginx rh-php72-php-fpm
systemctl enable rh-nginx116-nginx rh-php72-php-fpm10. Start Zabbix server:
systemctl start zabbix-serverVerification
After the upgrade, verify the new UI. Zabbix 5.0 introduces a vertical sidebar menu, redesigned front‑end, host monitoring module, test button for items, and moved SNMP credentials to host interfaces.
Note: Files for the rh-php72 collection are located under /etc/opt/rh/rh-php72/ and logs under /var/opt/rh/rh-php72/log/.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
