ZABBIX3.2升级3.4的过程是怎么样的

本篇文章给大家分享的是有关ZABBIX3.2升级3.4的过程是怎么样的,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

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-ssh3 –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的过程是怎么样的,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注亿速云行业资讯频道。

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/199939.html

(0)
上一篇 2021年11月20日
下一篇 2021年11月20日

相关推荐

发表回复

登录后才能评论