1、配置epel源
wget -0 /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2、配置yum源
yum install https://repo.huaweicloud.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum install zabbix-server-mysql -y
yum install zabbix-agent2 -y
yum install centos-release-scl -y
3、修改配置文件,启用frontend
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1 # 启用
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
4、安装frontend
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y
5、安装配置数据库
yum install mariadb-server -y
systemctl enable --now mariadb
mysql_secure_installation
MariaDB [(none)]> create database zabbix character set utf8 collate