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

2025-05-27 0 87

1.zabbix备份

?

1

2

3

4

5

6

7

8

9

10

11
[root@iz2zeapnvuohe8p14289u6z /]# mkdir -p /soft/zabbixback/zabbix-backup

[root@iz2zeapnvuohe8p14289u6z /]# cp /etc/zabbix/zabbix_server.conf /soft/zabbixback/zabbix-backup

[root@iz2zeapnvuohe8p14289u6z /]# cp /etc/zabbix/zabbix_agentd.conf /soft/zabbixback/zabbix-backup

[root@iz2zeapnvuohe8p14289u6z /]# cp /etc/zabbix/web/zabbix.conf.php /soft/zabbixback/zabbix-backup

[root@iz2zeapnvuohe8p14289u6z /]# cp -r /usr/share/zabbix/ /soft/zabbixback/zabbix-backup

[root@iz2zeapnvuohe8p14289u6z /]# cp –r /usr/share/doc/zabbix-* /soft/zabbixback/zabbix-backup

2. mariadb数据库备份

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21
[root@iz2zeapnvuohe8p14289u6z /]# 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

[root@iz2zeapnvuohe8p14289u6z /]# 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

?

1
[root@iz2zeapnvuohe8p14289u6z /]# systemctl stop zabbix-agent zabbix-server

4.卸载旧版本4.4

?

1
[root@iz2zeapnvuohe8p14289u6z /]# yum remove zabbix-web-* httpd

5. 4.4升级5.0

?

1

2

3

4

5

6

7
[root@iz2zeapnvuohe8p14289u6z /]# rpm -uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

[root@iz2zeapnvuohe8p14289u6z /]# yum clean all

[root@iz2zeapnvuohe8p14289u6z /]# yum update zabbix-server zabbix-agent -y

[root@iz2zeapnvuohe8p14289u6z /]# yum-config-manager --enable rhel-server-rhscl-7-rpms

6.编辑zabbix.repo文件

?

1
[root@iz2zeapnvuohe8p14289u6z /]# vim /etc/yum.repos.d/zabbix.repo

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

7.安装zabbix前端包

?

1
[root@iz2zeapnvuohe8p14289u6z /]# yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y

8.zabbix前端php配置

?

1
[root@iz2zeapnvuohe8p14289u6z /]# vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

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

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

?

1

2
[root@iz2zeapnvuohe8p14289u6z /]# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm

[root@iz2zeapnvuohe8p14289u6z /]# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

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

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 行业资讯 zabbix监控4.4升级至5.0的详细教程 https://www.kuaiidc.com/63531.html

相关文章

发表评论
暂无评论