今天就跟大家聊聊有关如何进行RedHat 7 yum源替换,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
在RedHat没有注册的情况下,导致yum程序无法使用,提示如下,此时可用CentOS的地址进行替换
-
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
下面是解决办法:
1.在/etc/yum.repos.d目录下,创建一个文件rhel-debuginfo.repo
-
touch rhel-debuginfo.repo
2.编辑改文件,添加如下内容:
-
[base]
-
name=CentOS-$releasever – Base
-
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
-
gpgcheck=1
-
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
-
#released updates
-
[updates]
-
name=CentOS-$releasever – Updates
-
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
-
gpgcheck=1
-
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
-
[extras]
-
name=CentOS-$releasever – Extras
-
baseurl=http://mirrors.163.com/centos/7/extras//$basearch/
-
gpgcheck=1
-
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
-
[centosplus]
-
name=CentOS-$releasever – Plus
-
baseurl=http://mirrors.163.com/centos/7/centosplus//$basearch/
-
gpgcheck=1
-
enabled=0
附件是nginx的yum源:
-
[root@crm_db yum.repos.d]# more nginx.repo
-
[nginx]
-
name=nginx repo
-
baseurl=http://nginx.org/packages/rhel/7/$basearch/
-
gpgcheck=0
-
enabled=1
看完上述内容,你们对如何进行RedHat 7 yum源替换有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/200194.html