About Zabbix Server

Zabbix is a free and open source network monitoring Software tool which is used to monitor and track the availability and performance of your IT infrastracture: servers, network devices and other IT assets.

In this tutorial we will cover how to upgrade Zabbix Server 3.4.x to 4.0.x on CentOS 7 or RHEL 7. those steps can be used also to upgrade Zabbix Server 3.2.x to 3.4.x or to 4.0.x.

1./ Stop Zabbix Server Daemon

– Stop Zabbix Server to make sure that no new data is inserted into database:

# systemctl stop zabbix-server

2./ Back up the existing Zabbix database

– Create a directory where we will backup the Zabbix Server database and configuration Files:

# mkdir /opt/zabbix-backup/

– Use the following command to backup the Zabbix Server database, replace zabbixdb with the name of your Zabbix Server database:

# mysqldump -u root -p zabbixdb > /opt/zabbix-backup/zabbixdb.sql Enter password:

3./ Back up configuration files, PHP files and Zabbix binaries

Make a backup copy of Zabbix binaries, configuration files and the PHP file directory.

– To backup the Zabbix Server configuration files use the following command:

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



– To backup the PHP files and Zabbix Server binaries use the following command:

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

4./ Update Zabbix Server repository configuration package

– Upgrade the Zabbix current repository package release as below:

# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm Retrieving https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:zabbix-release-4.0-1.el7 ################################# [ 50%] Cleaning up / removing... 2:zabbix-release-3.4-1.el7.centos ################################# [100%]

5./ Upgrade Zabbix Server components

– To upgrade Zabbix Server components, run the following commands:

# yum clean all # yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent

6./ Start Zabbix Server Daemon

# systemctl start zabbix-server



We hope this tutorial was enough helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!