本篇文章给大家分享的是有关ZABBIX3.2升级3.4的过程是怎么样的,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
停止zabbix服务
service zabbix_server stopservice zabbix_agentd stop/usr/local/zabbix/sbin/zabbix_java/shutdown.sh
2.保存配置文件
mv /usr/local/zabbix /usr/local/zabbix.bakmv /usr/local/nginx/html/zabbix /usr/local/nginx/html/zabbix.bakcp /etc/init.d/zabbix_server /etc/init.d/zabbix_server_bakcp /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.confmv /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/logschown -R zabbix:zabbix /usr/local/zabbixmv /etc/init.d/zabbix_server_bak /etc/init.d/zabbix_servermv /etc/init.d/zabbix_agentd_bak /etc/init.d/zabbix_agentd
6.修改网页参数
mkdir /usr/local/nginx/html/zabbixcp -a /root/zabbix-3.4.7/frontends/php/* /usr/local/nginx/html/zabbixcp /usr/local/nginx/html/zabbix/conf/zabbix.conf.php.example /usr/local/nginx/html/zabbix/conf/zabbix.conf.phpvi /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/
启动zabbix
chkconfig --add zabbix_serverchkconfig --add zabbix_agentdchkconfig --level 35 zabbix_agentd onchkconfig --level 35 zabbix_server on
service snmpd restartservice mysqld restartservice 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: YES29303:20181012:202522.157 IPMI monitoring: YES29303:20181012:202522.157 Web monitoring: YES29303:20181012:202522.157 VMware monitoring: YES29303:20181012:202522.157 SMTP authentication: NO29303:20181012:202522.157 Jabber notifications: NO29303:20181012:202522.157 Ez Texting notifications: YES29303:20181012:202522.157 ODBC: YES29303:20181012:202522.157 SSH2 support: YES29303:20181012:202522.157 IPv6 support: YES29303:20181012:202522.157 TLS support: NO29303:20181012:202522.157 ******************************29303:20181012:202522.157 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf29303:20181012:202522.224 current database version (mandatory/optional): 03020000/0302000029303:20181012:202522.224 required mandatory version: 0304000029303:20181012:202522.224 optional patches were found29303:20181012:202522.224 starting automatic database upgrade29303:20181012:202522.251 completed 0% of database upgrade29303:20181012:202522.759 completed 1% of database upgrade....................略29303:20181012:202529.444 completed 100% of database upgrade29303: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: YES29428:20181012:202928.288 IPMI monitoring: YES29428:20181012:202928.288 Web monitoring: YES29428:20181012:202928.289 VMware monitoring: YES29428:20181012:202928.289 SMTP authentication: NO29428:20181012:202928.289 Jabber notifications: NO29428:20181012:202928.289 Ez Texting notifications: YES29428:20181012:202928.289 ODBC: YES29428:20181012:202928.292 SSH2 support: YES29428:20181012:202928.292 IPv6 support: YES29428:20181012:202928.292 TLS support: NO29428:20181012:202928.292 ******************************29428:20181012:202928.292 using configuration file: /usr/local/zabbix/etc/zabbix_server.conf29428:20181012:202928.368 current database version (mandatory/optional): 03040000/0304000629428:20181012:202928.368 required mandatory version: 03040000
以上就是ZABBIX3.2升级3.4的过程是怎么样的,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网行业资讯频道。