Rough guide to get your monitoring server up to Zabbix 2.4.x on CentOS 6.x
The upgrade needs to be done in 3 stages.Stage 1 – Upgrade from 1.8.x to 2.0.x: All steps, with 4a;5a;Stage 2 – Upgrade from 2.0.x to 2.2.x: Only steps 1;2;3;4b;5b;7;8;Stage 3 – Upgrade from 2.2.x to 2.4.x: Only steps 1;2;3;4c;5c;7;8;9;
1. Stop Zabbix Services
/etc/init.d/zabbix-server stop /etc/init.d/zabbix-agent stop2. Take a backup of zabbix configuration files (/etc/zabbix/*)mkdir ~/etc_zabbix.bakcp -r -p /etc/zabbix/* ~/etc_zabbix.bak3. Take a backup of Zabbix database (mysql)mysqldump -u zabbix -p zabbix > ~/zabbix_dump.sql4. Remove your existing Zabbix Installationa) yum erase zabbix*b) yum erase zabbix20* – remove zabbix 2.0 – c) yum erase zabbix22* – remove zabbix 2.2Note! For version 2.0 and 2.2 installed via epel use commands below 5. Install Zabbix a) yum –enablerepo=epel install zabbix20-server-mysql zabbix20-agent zabbix20-web-mysqlb) yum install zabbix22-server-mysql zabbix22-agent zabbix22-web-mysqlc) Add 2.4 repo: rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmInstall zabbix 2.4: yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent6. Upgrade DB Schema from 1.8.x to 2.0.x consists of 2 steps. (Only required for 1.8 to 2.0)a) make upgrade script executable. chmod +x /usr/share/zabbix-mysql/upgrades/2.0/upgradeb) run the scriptcd /usr/share/zabbix-mysql/upgrades/2.0/./upgrade -u zabbix -p zabbixNote! Bear in mind that upgrade will take a while and you will get multiple DB password prompts Note2! for Stage2 and Stage3, mysql upgrade will happen automatically after you start Zabbix 7. Next compare and update your configuration files. Old config files are in the zabbix folder (/etc/zabbix/) with the following extension .rpmsaveUse the following commands to compare:diff /etc/zabbix/zabbix_agentd.conf.rpmsave /etc/zabbix_agentd.confdiff /etc/zabbix/zabbix_server.conf.rpmsave /etc/zabbix_server.confOr use a tool called winmerge8. Start Zabbix-services/etc/init.d/zabbix-server start/etc/init.d/zabbix-agent start9. Enable autostart for Zabbix serviceschkconfig zabbix-server onchkconfig zabbix-agent on-Devin