mkdir -p /opt/zabbix_backup/bin_files /opt/zabbix_backup/conf_files /opt/zabbix_backup/doc_files
mkdir -p /opt/zabbix_backup/web_files /opt/zabbix_backup/db_files
cp -rp /etc/zabbix/zabbix_server.conf /opt/zabbix_backup/conf_files
cp -rp /usr/sbin/zabbix_server /opt/zabbix_backup/bin_files
cp -rp /usr/share/doc/zabbix-* /opt/zabbix_backup/doc_files
cp -rp /etc/httpd/conf.d/zabbix.conf /opt/zabbix_backup/conf_files 2>/dev/null
cp -rp /etc/apache2/conf-enabled/zabbix.conf /opt/zabbix_backup/conf_files 2>/dev/null
cp -rp /etc/zabbix/php-fpm.conf /opt/zabbix_backup/conf_files 2>/dev/null
apt update
apt upgrade
mysql -uroot -p
SET GLOBAL log_bin_trust_function_creators = 1;
dpkg –purge zabbix-release
wget https://repo.zabbix.com/zabbix/6.2/debian/pool/main/z/zabbix-release/zabbix-release_6.2-2%2Bdebian11_all.deb
dpkg -i zabbix-release_6.2-2+debian11_all.deb
apt update
systemctl stop zabbix-server zabbix-agent apache2
apt install -y –only-upgrade zabbix-server-mysql zabbix-frontend-php
cat /var/log/zabbix/zabbix_server.log | grep database
cat /var/log/zabbix/zabbix_server.log
systemctl status zabbix-server
systemctl start zabbix-server zabbix-agent apache2
systemctl status mysql
mysql -uroot -p
SET GLOBAL log_bin_trust_function_creators = 0;
systemctl stop zabbix-server
mysql -u root -p
select * from dbversion;
update dbversion set mandatory=06000000,optional=06000000;
select * from dbversion;
quit;
systemctl start zabbix-server