运维开发网
广告位招商联系QQ:123077622
 
广告位招商联系QQ:123077622

zabbix监控4.4升级至5.0的详细教程

运维开发网 https://www.qedev.com 2020-07-27 15:09 出处:网络 作者: 常来北京
这篇文章主要介绍了zabbix监控4.4升级至5.0的详细教程,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

1.ZABBIX备份

[[email protected] /]# mkdir -p /soft/zabbixback/zabbix-backup
 
[[email protected] /]# cp /etc/zabbix/zabbix_server.conf   /soft/zabbixback/zabbix-backup
 
[[email protected] /]# cp /etc/zabbix/zabbix_agentd.conf  /soft/zabbixback/zabbix-backup
 
[[email protected] /]# cp /etc/zabbix/web/zabbix.conf.php /soft/zabbixback/zabbix-backup
 
[[email protected] /]# cp -R /usr/share/zabbix/  /soft/zabbixback/zabbix-backup
 
[[email protected] /]# cp –R /usr/share/doc/zabbix-* /soft/zabbixback/zabbix-backup 

2. MariaDB数据库备份

[[email protected] /]# mysql # 进入mysql
 
MariaDB [(none)]> select count(8) tables,table_schema from information_schema.tables where table_schema = 'zabbix';
+--------+--------------+
| tables | table_schema |
+--------+--------------+
| 166 | zabbix |
+--------+--------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> mysqldump -uzabbix -pzabbix --opt --skip-lock-tables zabbix | gzip > /home/backup/zabbix_$(date +%Y%m%d_%H%M%S).sql.gz
 
[[email protected] /]# ll /soft/zabbixback
 
总用量 5120
 
-rw-r--r-- 1 root root   20 7月 23 10:48 zabbix_20200726_104832.sql.gz
 
-rw-r--r-- 1 root root 526 7月 23 10:48 zabbix_20200726_104849.sql.gz
 
drwxr-xr-x 3 root root  96 7月 23 10:45 zabbix-backup<br data-filtered="filtered"><br data-filtered="filtered">

3. 停止 zabbix-server,zabbix-agent

[[email protected] /]# systemctl stop zabbix-agent zabbix-server

4.卸载旧版本4.4

[[email protected] /]# yum remove zabbix-web-* httpd

5. 4.4升级5.0

[[email protected] /]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
 
[[email protected] /]# yum clean all
 
[[email protected] /]# yum update zabbix-server zabbix-agent -y
 
[[email protected] /]# yum-config-manager --enable rhel-server-rhscl-7-rpms

6.编辑zabbix.repo文件

[[email protected] /]# vim /etc/yum.repos.d/zabbix.repo

zabbix监控4.4升级至5.0的详细教程

7.安装zabbix前端包

[[email protected] /]# yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y

8.Zabbix前端PHP配置

[[email protected] /]# vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

zabbix监控4.4升级至5.0的详细教程

9.启动zabbix的server和agent、并设置为开机启动

[[email protected] /]# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
[[email protected] /]# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

到此这篇关于zabbix监控4.4升级至5.0的文章就介绍到这了,更多相关zabbix监控内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消