CentOS7.8 Zabbix4.4 MariaDB10.3.23 PHP 7.2
根据官方文档从4.4升级5.0 https://www.zabbix.com/documentation/current/manual/installation/upgrade/packages/rhel_centos
升级大致过程 systemctl stop zabbix-server rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm yum clean all yum makecache yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent yum install zabbix-apache-conf-scl &emsp Remove old frontend yum remove zabbix-web-* yum install centos-release-scl yum clean all Edit /etc/yum.repos.d/zabbix.repo file. Replace enabled=0 with enabled=1.
[zabbix-frontend] ... enabled=1 ... yum clean all yum makecache yum install zabbix-web-mysql-scl yum update zabbix-* systemctl restart zabbix-server systemctl start rh-php72-php-fpm systemctl enable rh-php72-php-fpm systemctl restart httpd
参考: https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500 在Mariadb选择zabbix库后执行命令 https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/database/mysql/double.sql mysql -u root -p use zabbix; 复制下面命令 ALTER TABLE trends MODIFY value_min DOUBLE PRECISION DEFAULT '0.0000' NOT NULL, MODIFY value_avg DOUBLE PRECISION DEFAULT '0.0000' NOT NULL, MODIFY value_max DOUBLE PRECISION DEFAULT '0.0000' NOT NULL; ALTER TABLE history MODIFY value DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
修改 vi /etc/zabbix/web/zabbix.conf.php 添加 $DB['DOUBLE_IEEE754'] = true; 重启zabbix服务 systemctl restart zabbix-server