赞
踩
某企业由于zabbix版本较低,某些监控项需要升级zabbix6.x版本才可以使用。
1、esxi生成快照(物理机则选择一台空闲服务器操作为最佳)
2、备份数据库(重要)
3、有两种方式:
zabbix6.x不支持centos7,所以需将centos7升级到centos8,或者新增一台centos8服务器。
centos7升级成centos8
https://blog.csdn.net/weixin_44857388/article/details/134931718?spm=1001.2014.3001.5501
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm
dnf clean all
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
vim /etc/zabbix/zabbix_server.conf
...
DBHost=xxxxxx #数据库
DBPort=xxxx #数据库端口
DBName=zabbix #数据库名称
DBUser=zabbix #管理数据库的用户
DBPassword=xxxxxx #用户密码
....
按ESC后:wq保存退出
vim /etc/nginx/conf.d/zabbix.conf
...
listen 8080;
server_name example.com; #取消注释并修改
...
按ESC后:wq保存退出
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
使用Navicat Premium备份数据库或者使用mysqldump备份数据库
这里使用mysqldump备份数据库
mysqldump -u root -p zabbix --ignore-table=zabbix.history --ignore-table=zabbix.history_uint --ignore-table=zabbix.history_str --ignore-table=zabbix.history_text --ignore-table=zabbix.history_log --ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint --ignore-table=zabbix.alerts --ignore-table=zabbix.events>/opt/zbx5.x.sql
https://blog.csdn.net/weixin_44857388/article/details/134931843?spm=1001.2014.3001.5501
cp /opt/zbx5.x.sql root@new:/opt/zbx5.x.sql
#在新设备上导入数据库
#mysql -u root -p
#use zabbix
#清空原数据库所有数据
#
#source /opt/zbx5.x.sql
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。