How to Upgrade zabbix 2.2 to 2.4

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

https://erickoo.wordpress.com/2015/05/28/upgrading-zabbix-from-1-8-x-to-2-4-x/


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 stop


2. Take a backup of zabbix configuration files (/etc/zabbix/*)
mkdir ~/etc_zabbix.bak
cp -r -p /etc/zabbix/* ~/etc_zabbix.bak


3. Take a backup of Zabbix database (mysql)
mysqldump -u zabbix -p zabbix > ~/zabbix_dump.sql

4. Remove your existing Zabbix Installation
a) yum erase zabbix*
b) yum erase zabbix20* – remove zabbix 2.0 – 
c) yum erase zabbix22* – remove zabbix 2.2
Note! 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-mysql
b) yum install zabbix22-server-mysql zabbix22-agent zabbix22-web-mysql
c) Add 2.4 repo:  rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Install zabbix 2.4: yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

6. 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/upgrade
b) run the script
cd /usr/share/zabbix-mysql/upgrades/2.0/
./upgrade -u zabbix -p zabbix
Note! 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 .rpmsave
Use the following commands to compare:
diff /etc/zabbix/zabbix_agentd.conf.rpmsave /etc/zabbix_agentd.conf
diff /etc/zabbix/zabbix_server.conf.rpmsave /etc/zabbix_server.conf

Or use a tool called winmerge
8. Start Zabbix-services
/etc/init.d/zabbix-server start
/etc/init.d/zabbix-agent start

9. Enable autostart for Zabbix services
chkconfig zabbix-server on
chkconfig zabbix-agent on

-Devin

 


本文转自 zhangfang526 51CTO博客,原文链接:http://blog.51cto.com/zhangfang526/1711271


相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
监控 关系型数据库 MySQL
zabbix-server和zabbix-agent简单安装
zabbix-server和zabbix-agent简单安装
181 0
|
编解码 监控 关系型数据库
|
监控 关系型数据库 MySQL
|
监控 关系型数据库 MySQL
|
监控 网络协议 关系型数据库
|
SQL 监控 关系型数据库
|
关系型数据库 应用服务中间件 PHP