Update 'upgrade_5.4.x_to_6.0.x.md'

This commit is contained in:
David Leutgeb 2022-03-15 13:22:59 +01:00
parent 9c6fa2cb15
commit 1404198975

View File

@ -1,95 +1,97 @@
# Zabbix Upgrade V5 to V6 (Debian 10, PostgreSQL, TimescaleDB) # Zabbix Upgrade v5.4.x to v6.0.x (Debian 10, PostgreSQL, TimescaleDB)
## Upgrade TimescaleDB ## Upgrade TimescaleDB
### Install new timescaledb version ### Install new timescaledb version
apt install timescaledb-2-2.6.0-postgresql-12 ```
apt install timescaledb-2-2.6.0-postgresql-12
### Connect to Postgresql ```
sudo -u postgres psql -X ### Connect to Postgresql
### Switch to database zabbix sudo -u postgres psql -X
\c zabbix ### Switch to database zabbix
### Update the postgresql extension \c zabbix
ALTER EXTENSION timescaledb UPDATE; ### Update the postgresql extension
### Verify that the new timescaledb version is used ALTER EXTENSION timescaledb UPDATE;
\dx timescaledb ### Verify that the new timescaledb version is used
## Upgrade PostgreSQL to 14 \dx timescaledb
### Install Postgresql 14 ## Upgrade PostgreSQL to 14
apt install postgresql-14 ### Install Postgresql 14
### Install Timescaledb apt install postgresql-14
apt install timescaledb-2-2.6.0-postgresql-14 ### Install Timescaledb
### Stop all postgresql clusters apt install timescaledb-2-2.6.0-postgresql-14
service postgresql@12-main stop ### Stop all postgresql clusters
service postgresql@14-main stop
service postgresql@12-main stop
### Drop the new postgresql cluster service postgresql@14-main stop
pg_dropcluster 14 main ### Drop the new postgresql cluster
### Run pg_upgradecluster to upgrade the cluster to v14 pg_dropcluster 14 main
pg_upgradecluster -v 14 --method=upgrade --link 12 main ### Run pg_upgradecluster to upgrade the cluster to v14
### Make sure the new cluster ist listening on port 5432 pg_upgradecluster -v 14 --method=upgrade --link 12 main
netstat -tapen | grep LISTEN ### Make sure the new cluster ist listening on port 5432
### Drop the old postgresql cluster netstat -tapen | grep LISTEN
pg_dropcluster 12 main ### Drop the old postgresql cluster
### Verify they timescaledb version on the zabbix db pg_dropcluster 12 main
sudo -u postgres psql ### Verify they timescaledb version on the zabbix db
\c zabbix
\dx sudo -u postgres psql
\c zabbix
## Upgrade Zabbix from 5.4.x to 6.0 (Steps for Debian 10) \dx
### Remove the old repository list ## Upgrade Zabbix from 5.4.x to 6.0 (Steps for Debian 10)
rm -Rf /etc/apt/sources.list.d/zabbix.list ### Remove the old repository list
### Install the new repository list rm -Rf /etc/apt/sources.list.d/zabbix.list
wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian10_all.deb ### Install the new repository list
dpkg -i zabbix-release_6.0-1+debian10_all.deb wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian10_all.deb
### Update the repositroy cache dpkg -i zabbix-release_6.0-1+debian10_all.deb
apt clean ### Update the repositroy cache
apt update
apt clean
### Verify that zabbix will be upgraded to v6 apt update
apt list --upgradeable ### Verify that zabbix will be upgraded to v6
### Install all upgrades apt list --upgradeable
apt ugprade ### Install all upgrades
### Start zabbix Server apt ugprade
service zabbix-server start ### Start zabbix Server
### Check the log file for errors service zabbix-server start
vim /var/log/zabbix/zabbix_server.log ### Check the log file for errors
vim /var/log/zabbix/zabbix_server.log
### Verify the web interface is up and running ### Verify the web interface is up and running