免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 183 | 回复: 0

[Zabbix] ZABBIX3.2升级3.4步骤详解 [复制链接]

论坛徽章:
0
发表于 2018-12-03 16:51 |显示全部楼层
1.停止zabbix服务
service zabbix_server stop
service zabbix_agentd stop
/usr/local/zabbix/sbin/zabbix_java/shutdown.sh

2.保存配置文件
mv /usr/local/zabbix /usr/local/zabbix.bak
mv /usr/local/nginx/html/zabbix /usr/local/nginx/html/zabbix.bak
cp /etc/init.d/zabbix_server /etc/init.d/zabbix_server_bak
cp /etc/init.d/zabbix_agentd /etc/init.d/zabbix_agentd_bak

3.更新libevent
http://libevent.org/
https://github.com/libevent/libe ... 2.1.8-stable.tar.gz
tar -zxfv libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure
make && make install
ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/


4.编译安装zabbix3.4
tar -zxfv zabbix-3.4.7.tar.gz
cd zabbix-3.4.7
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 -with-unixodbc --with-ssh2 --with-openipmi --enable-ipv6 --enable-java
./configure
make && make install

5.修改配置参数
cp /usr/local/zabbix.bak/etc/zabbix_agentd.conf /usr/local/zabbix/etc/zabbix_agentd.conf
mv /usr/local/zabbix.bak/scripts  /usr/local/zabbix/
mv /usr/local/zabbix.bak/etc/zabbix_agentd.conf.d   /usr/local/zabbix/etc/
mv /usr/local/zabbix.bak/sbin/zabbix_java /usr/local/zabbix/sbin/
vi /usr/local/zabbix.bak/etc/zabbix_server.conf             #3.4和3.2相比配置参数增加了,需要手动配置或者用已做好的3.4配置文件替换,修改IP即可
mkdir -p /usr/local/zabbix/logs
chown -R zabbix:zabbix /usr/local/zabbix
mv /etc/init.d/zabbix_server_bak /etc/init.d/zabbix_server
mv /etc/init.d/zabbix_agentd_bak /etc/init.d/zabbix_agentd

6.修改网页参数
mkdir /usr/local/nginx/html/zabbix
cp -a /root/zabbix-3.4.7/frontends/php/* /usr/local/nginx/html/zabbix
cp /usr/local/nginx/html/zabbix/conf/zabbix.conf.php.example /usr/local/nginx/html/zabbix/conf/zabbix.conf.php
vi  /usr/local/nginx/html/zabbix/conf/zabbix.conf.php     #3.4和3.2相比配置参数增加了,需要手动配置或者用已做好的3.4配置文件替换,修改IP即可
chown -R zabbix.zabbix /usr/local/nginx/html/zabbix/
chmod -R 755 /usr/local/nginx/html/zabbix/


7.启动zabbix
chkconfig --add zabbix_server
chkconfig --add zabbix_agentd
chkconfig --level 35 zabbix_agentd on
chkconfig --level 35 zabbix_server on

service snmpd restart
service mysqld restart
service httpd restart
/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
/usr/local/zabbix/sbin/zabbix_java/startup.sh

8观察日志
vi /usr/local/zabbix/logs/zabbix_server.log

29303:20181012:202522.157 Starting Zabbix Server. Zabbix 3.4.7 (revision 77720).
29303:20181012:202522.157 ****** Enabled features ******
29303:20181012:202522.157 SNMP monitoring:           YES
29303:20181012:202522.157 IPMI monitoring:           YES
29303:20181012:202522.157 Web monitoring:            YES
29303:20181012:202522.157 VMware monitoring:         YES
29303:20181012:202522.157 SMTP authentication:        NO
29303:20181012:202522.157 Jabber notifications:       NO
29303:20181012:202522.157 Ez Texting notifications:  YES
29303:20181012:202522.157 ODBC:                      YES
29303:20181012:202522.157 SSH2 support:              YES
29303:20181012:202522.157 IPv6 support:              YES
29303:20181012:202522.157 TLS support:                NO
29303:20181012:202522.157 ******************************
29303:20181012:202522.157 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf
29303:20181012:202522.224 current database version (mandatory/optional): 03020000/03020000
29303:20181012:202522.224 required mandatory version: 03040000
29303:20181012:202522.224 optional patches were found
29303:20181012:202522.224 starting automatic database upgrade
29303:20181012:202522.251 completed 0% of database upgrade
29303:20181012:202522.759 completed 1% of database upgrade
....................略
29303:20181012:202529.444 completed 100% of database upgrade
29303:20181012:202529.444 database upgrade fully completed             #数据库自动升级成功



# 再次重启zabbix可以看到数据库已经成3.4的了
service zabbix_server restart
vi /usr/local/zabbix/logs/zabbix_server.log

29428:20181012:202928.286 Starting Zabbix Server. Zabbix 3.4.7 (revision 77720).
29428:20181012:202928.288 ****** Enabled features ******
29428:20181012:202928.288 SNMP monitoring:           YES
29428:20181012:202928.288 IPMI monitoring:           YES
29428:20181012:202928.288 Web monitoring:            YES
29428:20181012:202928.289 VMware monitoring:         YES
29428:20181012:202928.289 SMTP authentication:        NO
29428:20181012:202928.289 Jabber notifications:       NO
29428:20181012:202928.289 Ez Texting notifications:  YES
29428:20181012:202928.289 ODBC:                      YES
29428:20181012:202928.292 SSH2 support:              YES
29428:20181012:202928.292 IPv6 support:              YES
29428:20181012:202928.292 TLS support:                NO
29428:20181012:202928.292 ******************************
29428:20181012:202928.292 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf
29428:20181012:202928.368 current database version (mandatory/optional): 03040000/03040006
29428:20181012:202928.368 required mandatory version: 03040000


原文
ZABBIX3.2升级3.4

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

数据风云,十年变迁
DTCC 第十届中国数据库技术大会已启航!

2019年5月8日~5月10日,由IT168旗下ITPUB企业社区平台主办的第十届中国数据库技术大会(DTCC2019),将在北京隆重召开。大会将邀请百余位行业专家,就热点技术话题进行分享,是广大数据领域从业人士的又一次年度盛会和交流平台。与SACC2018类似,本届大会将采用“3+2”模式:3天传统技术演讲+2天深度主题培训。大会不仅提供超100场的主题演讲,还会提供连续2天的深度课程培训,深化数据领域的项目落地实践方案。
DTCC2019,一场值得期待的数据技术盛会,殷切地希望您报名参与!

活动入口>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP