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!
PS. If you like this post please share it with your friends on the social networks using the buttons below.Thanks.
7 comments
I seem to have a problem when going from 3.2 to 4, After the upgrade I get and error message saying that the database is the wrong version. Do i have to do 3.2->3.4->4.0 or 3.2->4.0 is ok?
Hi Yan,
You need to upgrade from the version 3.2 to 3.4 and after that upgrade to 4.x
Hi,
I get “No packages marked for update” after running step 5, please can you advise?
Thanks.
Hi, I’ve followed the above steps but after step 5 I just get “No packages marked for update” – please can you help?
Hi rich,
you need to clean the yum repository and try again
Thanks, that worked. I’m a Linux newbie.
We are glad that u fix it, Please subscribe to our youtube channel to keep updated .