- 配置本地环境关闭selinux和防火墙
[root@zabbix-server zabbix]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
[root@zabbix-server zabbix]# setenforce 0
[root@zabbix-server zabbix]# systemctl stop firewall.service
配置zabbix安装源-------------使用的是阿里的源
https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/
选择你要安装5.x版本我这里选择5.0的版本
[root@zabbix-server ~]# wget https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
[root@zabbix-server ~]# rpm -ivh zabbix-release-5.0-1.el7.noarch.rpm
修改下载地址
[root@zabbix-server ~]# sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
安装zabbix-server 和agent
[root@zabbix-server ~]# yum install zabbix-server-mysql zabbix-agent
安装 Software Collections,便于后续安装高版本的 php
[root@zabbix-server ~]# yum install centos-release-scl -y
启用 zabbix 前端源,修改/etc/yum.repos.d/zabbix.repo,将[zabbix-frontend]下的 enabled 改为 1
[root@zabbix-server ~]# cat /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=1
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=htt