Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix3.0.0 upgrade zabbix3.2.1 version

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Background:

Recently, the company's zabbix often has alarms that cannot be eliminated, and the alarm Bug can not be eliminated until it is restarted. I later learned that this is a bug of the zabbix3.0.0 version, so consider upgrading the current version of zbbix to the latest version 3.2.1.

Upgrading the zabbix3.0.0 version and the zabbix3.2.1 version is easy, but there are many minor problems. For example, the two versions of the database tables are inconsistent, so be sure to do a good backup operation.

Zabbix server related directories:

Backup directory: / opt/backups/zabbix

Zabbix home directory: / opt/apps/zabbix

Server profile: / opt/conf/zabbix/zabbix_server.conf

Front-end page directory: / opt/webapps/zabbix

Service startup script: / etc/init.d/zabbix_server

Upgrade steps:

1: download the zabbix installation package zabbix-3.2.1.tar.gz on the official website, extract it, and compile and install the new version in the new directory.

# tar-zxvf zabbix-3.2.1.tar.gz# cd zabbix-3.2.1#. / configure-- prefix=/opt/apps/zabbix.3.2-- enable-server-- enable-agent-- with-mysql-- enable-ipv6-- with-net-snmp-- with-libcurl-- with-libxml2# make install

2: stop the running zabbix service and make sure that no new data is written to the database.

# / etc/init.d/zabbix_server stop

3: back up the database data of the original zabbix and related configuration files.

# mysqldump-h 127.0.0.1-u zabbix-ppassword zabbix > / opt/backup/zabbix/zabbix_bak.sql# cp-p / opt/conf/zabbix/zabbix_server.conf / opt/backup/zabbix/zabbix_server.conf.3.0# cp-p / opt/webapps/zabbix/conf/zabbix.conf.php / opt/backup/zabbix/zabbix.conf.php.3.0

4: replace the relevant configuration files of the new version and refer to the old configuration files to configure the service.

# cp-p / opt/apps/zabbix.3.2/etc/zabbix_server.conf / opt/conf/zabbix/zabbix_server.conf# grep-v "^ #" zabbix_server.conf | grep-v "^ $" LogFile=/opt/logs/zabbix/zabbix_server.logPidFile=/opt/logs/zabbix/zabbix_server.pidDBHost=127.0.0.1DBName=zabbixDBUser=zabbixDBPassword=xxxxxxxxDBPort=3306JavaGateway=xx.xx.xx.xxJavaGatewayPort=10052StartJavaPollers=5Timeout=4AlertScriptsPath=/opt/apps/zabbix/share/zabbix/alertscriptsLogSlowQueries=3000

5: replace the zabbix home directory and execute the bin file to start the service with the new zabbix.

# mv / opt/apps/zabbix / opt/apps/zabbix.3.0# mv / opt/apps/zabbix.3.2 / opt/apps/zabbix replication related script file: # cp-rp / opt/apps/zabbix.3.0/share/zabbix/alertscripts/* / opt/apps/zabbix# / etc/init.d/zabbix_server start

Normally, the new zabbix service automatically updates the fields in the mysql database if the following related errors occur:

Query failed: [1060] Duplicate column name 'exec_params' [alter table media_type add exec_params varchar (1060) default' 'not null]

You need to delete the fields of the related table in mysql before restarting the service.

Note: fields to be deleted: exec_params fields in the media_ type table, all fields beginning with tls in the hosts table.

Logging in to the zabbix page will prompt the database version to be inconsistent, because the zabbix database version used by the front-end page is different from that used by the back-end service. You need to replace the front-end page with the new version page.

6: replace the zabbix front-end page.

# mv / opt/webapps/zabbix/ opt/webapps/zabbix.3.0# cp-rp / opt/src/frontends/php / opt/webapps/zabbix# cp-p / opt/backup/zabbix/zabbix.conf.php.3.0 / opt/webapps/zabbix/conf/zabbix.conf.php

At this point, the zabbix upgrade is complete.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report