zabbix小版本升级小技巧

Zabbix是许多企业的运维工作人员日常使用的一款开源监控软件,然后面对zabbix小版本的更新迭代,小编这里整理出了一些便捷方式和注意事项。

第一步:zabbix源码包下载地址:

https://cdn.zabbix.com/zabbix/sources/stable/5.0/

 第二步:zabbix_server服务

service  zabbix_server stop

第三步:zabbix_agentd服务

service zabbix_agentd stop

第四步:zabbix_java服务

sh /itops/zabbix/sbin/zabbix_java/shutdown.sh

第四步:拷贝原zabbix文件

mv /itops/zabbix /itops/zabbix.back

第五步:上传新版本zabbix源码包到/root目录

sz  zabbix-5.0.25.tar.gz

FU3zkT4m632bc18b300d9.png

第五步:解压zabbix源码包

tar -xvf  /root/zabbix-5.0.25.tar.gz  && cd /root/zabbix-5.0.25

第六步:安装gcc

yum install -y gcc

编译源码包

编译安装

./configure --prefix=/itops/zabbix --enable-server  --enable-agent  --with-postgresql=/itops/postgresql/bin/pg_config --with-net-snmp=/itops/net-snmp/bin/net-snmp-config --with-libcurl --with-libxml2 --with-unixodbc --with-openipmi --enable-ipv6 --enable-java --with-openssl --with-ssh2 --with-iconv --with-iconv-include --with-iconv-lib --with-libpcre --with-libpcre-include --with-libpcre-lib --with-libevent --with-libevent-include --with-zlib --with-zlib-include --with-zlib-lib --with-libpthread --with-libpthread-include --with-libpthread-lib --with-libevent-lib --with-ldap

=======================================================================================

免编译安装

yum -y install java-devel unixODBC* zlib libpthread pcre* ipmitool curl-devel gnutls libcurl-devel perl-DBI libdbi-dbd-mysql gcc gcc++ make libxml2 libxml2-devel  unixODBC* libssh2-devel freetds telnet nmap mysql-connector-odbc libevent-devel

./configure --prefix=/itops/zabbix --enable-server  --enable-agent  --with-postgresql=/itops/postgresql/bin/pg_config --with-net-snmp=/itops/net-snmp/bin/net-snmp-config --with-libcurl --with-libxml2 --with-unixodbc --with-openipmi --enable-ipv6 --enable-java --with-openssl --with-ssh2 --with-iconv --with-iconv-include --with-iconv-lib --with-libpcre --with-libpcre-include --with-libpcre-lib --with-libevent --with-libevent-include --with-zlib --with-zlib-include --with-zlib-lib --with-libpthread --with-libpthread-include --with-libpthread-lib --with-libevent-lib --with-ldap

注意: 如果环境是免编译安装,在编译过程中少了一些包直接用YUM安装

编译并安装

make && make install

将原来的配置文件复制回目录

cp -rf /itops/zabbix.back/etc/* /itops/zabbix/etc/

cp -rf /itops/zabbix.back/scripts /itops/zabbix/

cp -rf /itops/zabbix.back/share/* /itops/zabbix/share/

mkdir /itops/zabbix/logs

chown -R itops: /itops/zabbix

前端UI替换

mv /itops/nginx/html/zabbix /itops/nginx/html/zabbix.back

cp -rf /root/zabbix-5.0.24/ui /itops/nginx/html/zabbix

chown -R itops: /itops/nginx/html/zabbix

第七步:重启zabbix_java服务

sh /itops/zabbix/sbin/zabbix_java/startup.sh

第八步:重启zabbix_server服务

service  zabbix_server restart

第九步:重启zabbix_agentd服务

service  zabbix_agentd restart

最后:前端页面访问:

http://192.168.200.180/z/ 

rFXX8FWj632bc1e9d9ddb.png

2yNaZEwn632bc154bc542.png


40KoMsb9632bc15deb056.png

 

2zlOb7FF632bc16744c7c.png

 

0 条评论

请先 登录 后评论
乐维君
乐维君

344 篇文章

作家榜 »

  1. 乐维君 344 文章
  2. YOHOHO 14 文章
  3. 机灵小和尚 13 文章
  4. 我是一只小菜鸡 12 文章
  5. 细雨闲花 11 文章
  6. 御前侍卫张五哥 9 文章
  7. 。。。 8 文章
  8. 小黄人 8 文章