[root@kazihuo ~]# yum -y install createrepo yum-utils
[root@kazihuo ~]# yum -y install https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
[root@kazihuo ~]# mkdir /kazihuo
[root@kazihuo ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id repo name status
zabbix/x86_64 Zabbix Official Repository - x86_64 132
zabbix-non-supported/x86_64 Zabbix Official Repository non-supported - x86_64 4
repolist: 9143
[root@kazihuo ~]# reposync -r zabbix -p /kazihuo/
[root@kazihuo ~]# rm -rf /etc/yum.repos.d/zabbix.repo
# 配置仓库文件,其中gpgkey在安装repo源时自动下载到/etc/pki/rpm-gpg下;
[root@kazihuo ~]# cat /etc/yum.repos.d/my.repo
[zabbix]
name=zabbix
baseurl=file:///kazihuo/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[root@kazihuo ~]# yum -y install zabbix-agent
-------------------------------------------------------------
转载请保留此段声明,且在文章页面明显位置给出原文链接,谢谢!
------------------------------------------------------------------------------
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
------------------------------------------------------------------------------