[root@centos ~]# uname -a Linux centos 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@centos ~]# rpm --import https://mirrors.aliyun.com/repoforge/RPM-GPG-KEY.dag.txt [root@centos ~]#
sudo cat > /etc/yum.repos.d/rpmforge.repo << EOF [rpmforge] name = RHEL $releasever - RPMforge.net - dag baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/rpmforge mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge enabled = 1 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1 [rpmforge-extras] name = RHEL $releasever - RPMforge.net - extras baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/extras mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge-extras enabled = 0 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1 [rpmforge-testing] name = RHEL $releasever - RPMforge.net - testing baseurl = https://mirrors.aliyun.com/repoforge/redhat/el7/en/$basearch/testing mirrorlist = http://mirrorlist.repoforge.org/el7/mirrors-rpmforge-testing enabled = 0 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1 EOF
[root@centos ~]# yum repolist Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * rpmforge: mirrors.aliyun.com * updates: mirrors.aliyun.com repo id repo name status base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 10,072 extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 500 rpmforge RHEL - RPMforge.net - dag 245 updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 3,242 repolist: 14,059 [root@centos ~]# S-7 - Updates - mirrors.aliyun.com 3,242 repolist: 14,059 [root@centos ~]#
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70003733/viewspace-2869124/ ,如需转载,请注明出处,否则将追究法律责任。