很惭愧,一直使用zabbix,但是直到今天才弄明白,原来在2.0.*版本内升级,数据库是不需要升级的。

官网上有这么一段说明:

1 Stop Zabbix server

Stop Zabbix server to make sure that no new data is inserted into database.

2 Back up the existing Zabbix database

This is a very important step. Make sure that you have a backup of your database. It will help if the upgrade procedure fails (lack of disk space, power off, any unexpected problem).

3 Back up configuration files, PHP files and Zabbix binaries

Make a backup copy of Zabbix binaries, configuration files and PHP files.

4 Install new server binaries

You may use pre-compiled binaries or compile your own.

5 Review server configuration parameters

Some parameters of zabbix_server.conf might have changed from 1.8, new parameters added. You may want to review them.

6 Upgrade the database

Before you upgrade:

  • Make sure the database user has enough permissions (create table, drop table, create index, drop index)
  • Make sure you have enough free disk space.

Database upgrade scripts are located in the upgrades/dbpatches/2.0/<db engine> directory. Run the scripts:

  • MySQL: upgrades/dbpatches/2.0/mysql/patch.sql
  • PostgreSQL: upgrades/dbpatches/2.0/postgresql/patch.sql
  • Oracle: upgrades/dbpatches/2.0/oracle/patch.sql
  • IBM DB2: upgrades/dbpatches/2.0/ibm_db2/patch.sql

These scripts are only for upgrading Zabbix 1.8.x to 2.0! For upgrading from earlier versions first use upgrade scripts from Zabbix 1.6.x or Zabbix 1.8.x.

7 Install new Zabbix web interface
8 Start new Zabbix binaries

Start new binaries. Check log files to see if the binaries have started successfully


这意思是说从1.8升级至2.0该怎么做,现在最高版本是2.0.9,所以说从1.8升级至2.0的话要按照这个来操作,但是要是2.0内部版本的提升,那就可以将第六步跳过。

将来2.2推出后,我们再说2.0升级2.2的事。