1、同步資源
# rsync -vrt rsync://repo.zabbix.com/mirror/zabbix/3.4/rhel/7/x86_64/ /home/mirrors/zabbix/3.4/rhel/7/x86_64/
2、配置apache發布鏡像目錄,當然也可以用nginx或者其他web服務器
# vim /etc/httpd/conf/httpd.conf
# 注釋掉這一段
# <Directory />
# AllowOverride none
# Require all denied
# </Directory>
# 添加這一段
Alias /zabbixrepo "/home/mirrors/zabbix/"
<Directory "/home/mirrors/zabbix">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
3、最后,配置repo就可以使用了
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://10.100.10.89/zabbixrepo/3.4/rhel/7/$basearch/
enabled=1
gpgcheck=0