Zabbix Upgrade Procedure from 2.4 to 3.0 on CentOS 7
In this tutorial I will show you how to upgrade your Zabbix 2.4 installation to Zabbix 3.0. Zabbix 3.0 has many improvements including a redesigned web interface. The upgrade procedure is on CentOS 7.
Step 1
First we need to stop Zabbix server to prevent any new data from being added to the database.
service zabbix-server stop
Step 2
Create a backup directory & take a backup of your MySQL database. You might be tempted to skip this step.. don't!
mkdir /zabbixbackup
mysqldump -uzabbix -pzabbix zabbix > /zabbixbackup/zabbix.sql
Ensure that you use your own MySQL username & password for the MySQL dump.
Step 3
Take a backup of your /etc/zabbix directory. Just zip the entire folder and also save it in your /zabbixbackup directory.
zip -r /zabbixbackup/zabbixconf.zip /etc/zabbix/
Step 4
Make a copy of your zabbix.conf file.
cp /etc/httpd/conf.d/zabbix.conf /zabbixbackup
Step 5
Make a backup of your Zabbix binaries. Again we can just zip everything and save to our backup directory.
zip -r /zabbixbackup/zabbixbinaries.zip /usr/share/doc/zabbix*
Step 6
Remove the Zabbix 2.4 Repo.
rpm -e zabbix-release-2.4*
Step 7
Install the new repo configuration file & clean the yum cache.
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum clean all
Step 8
Upgrade Zabbix
yum -y upgrade zabbix-server-mysql zabbix-web-mysql zabbix-server zabbix-agent
Step 9
Start Zabbix server.
service zabbix-server start
The database will automatically upgrade. If your database is large it may take a while. You can see the progress in /var/log/zabbix/zabbix_server.log.
Ensure that all your configuration files are correct after which you can access your new Zabbix 3.0 installation via your web browser.
http://your_server_ip/zabbix
You should now see the brand new web interface (screenshot below). Have fun monitoring!
Zabbix 3.0 Interface