CentOS Linux Zabbix

Upgrade from Zabbix 6.0 to 6.2 on CentOS 8

Zabbix is an open source monitoring system that can monitor almost anything. You can learn more about Zabbix here. For the purpose of this article I will using the predeployed Zabbix Appliance from Linode. Linode is a cloud based hosting service that offers really good pricing for Linux based servers. Best of all they have a datacenter that is really close to my house. You can learn more about Linode and their services here. If you are a new sign up they run a deal sometimes to get a free $100 credit which you could use toward running your VM.

Prep work

The first piece of advice that I can give while you are working on the upgrade you should open a second ssh session to your server and run the following command:

 sudo tail -f /var/log/zabbix/zabbix_server.log

This will give you a better view of what is going on with the application once you start the service back up.

The next step is to stop the Zabbix Server Service

systemctl stop zabbix-server

From here Zabbix reommends backing up your configuration files.

This command will create a new backup folder

mkdir /opt/zabbix-backup/

These commands will copy your config files to your backup folder

cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
cp /etc/httpd/conf.d/zabbix.conf /opt/zabbix-backup/

This will copy your .php files to your backup folder

cp -R /usr/share/zabbix/ /opt/zabbix-backup/
cp -R /usr/share/zabbix-* /opt/zabbix-backup/

Starting the update

To proceed with the upgrade your current repository package has to be updated.

rpm -Uvh

Switch the DNF module version for PHP:

dnf module switch-to php:7.4

To upgrade Zabbix components run the following command:

dnf upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent

Post upgrade work

Once the packages have been updated you will need to open your database. In my case I would type in mysql. Then according to the Zabbix documentation you need to run this command.

SET GLOBAL log_bin_trust_function_creators = 1;

One of the issues that I ran into, and I am not sure if this is just a Linode appliance issue or a CentOS issue but I had to run the following command. If I did not run this command the update would fail at 43% everytime.

grant all privileges on zabbix.* to 'zabbix_srv'@'localhost';

Once that is complete type quit and hen type thhe following command to start the Zabbix service.

systemctl start zabbix-server

Once you press enter the log file that you opened at the begin displaying output and you should see the entire startup processs and then update.

I hope you find this guide helpful and if so please share it with others.