I have old official Zabbix virtual appliance based on Ubuntu 16.04.
Last year I successfully upgrade it to Zabbix 4. And now (2020) I try upgrade to Zabbix 5 using official documentation:
https://www.zabbix.com/documentation/current/manual/installation/upgrade/packages/debian_ubuntu
And it's not so easy cause of I have old Ubuntu 16.04 and old PHP 7.0 unsupported by Zabbix 5.0.
Let's start:
First of all remove old repo /etc/apt/source.list.d/zabbix.conf
Then install new repo:
If you use PostgreSQL just replace "-mysql" to "-pgsql" in package names.
Last year I successfully upgrade it to Zabbix 4. And now (2020) I try upgrade to Zabbix 5 using official documentation:
https://www.zabbix.com/documentation/current/manual/installation/upgrade/packages/debian_ubuntu
And it's not so easy cause of I have old Ubuntu 16.04 and old PHP 7.0 unsupported by Zabbix 5.0.
Let's start:
First of all remove old repo /etc/apt/source.list.d/zabbix.conf
Then install new repo:
# wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+xenial_all.deb # dpkg -i zabbix-release_5.0-1+xenial_all.deb
# apt-get update
# service zabbix-server stop
If your asked to change config say No and preserve old configs.
# apt-get install --only-upgrade zabbix-server-mysql zabbix-frontend-php zabbix-agent
# service zabbix-server start
Wait until Zabbix Server update database schema. See it in Zabbix Server logs.
You may find that you installed old zabbix-frontend-php. I remove /etc/apt/source.list.d/zabbix.conf and old zabbix repo from /etc/apt/sources.list.
Search for zabbix packages and find package zabbix-frontend-php-deprecated
Just install it:
# apt-get install zabbix-frontend-php-deprecated
It's now named deprecated cause of Ubuntu 16.04 officially supports only PHP 7.0 but Zabbix 5.0 needs PHP 7.2.
Then we need to install unofficial PHP7.2:
# apt-get install software-properties-common python-software-properties
# add-apt-repository -y ppa:ondrej/php
# apt-get update
# apt-get install php7.2 php7.2-cli php7.2-common
# apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip php7.2-gd php7.2-bcmath php7.2-mbstring php7.2-xml php7.2-ldap php7.2-json
# a2dismod php7.0
# a2enmod php7.2
If you use PostgreSQL just replace "-mysql" to "-pgsql" in package names.
Don't forget set PHP timezone /etc/php/7.2/apache2/php.ini
Also we can't install apache2 zabbix config, so make it from example
# cp /usr/share/doc/zabbix-frontend-php-deprecated/example.apache.conf /etc/apache2/conf-enabled/zabbix.conf
Then restart apache2 and check Zabbix is work.
Комментарии
Отправить комментарий