Red Hat 8 configuration yum source

Use the transfer tool
to upload files to /etc/yum.repos.d/
insert image description here

or
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
insert image description here

Note: You cannot download wget and upload files directly.
Close the subscription plug-in prompt
[redhat@root ~]$ vi /etc/yum.conf #add
plugins=0
[redhat@root ~]$ vim /etc/yum/pluginconf.d/subscription- manager.conf
[main]
enabled=0 # disable it

#You can uninstall this module roughly
[redhat@root ~]$ yum remove subscription-manager
[Explanation]:
1. When the plugins are not disabled, when the value here is 1, it will be generated every time yum calls Or update the redhat.repo file
2. This Subscription Manager will always rewrite or update the /etc/yum.repos.d/redhat.repo file.

At this point, the replacement of yum has been completed.
[redhat@root ~]$ yum clean all #Empty the yum cache to make the settings take effect
[redhat@root ~]$ yum repolist #Load server software package cache information to improve the speed of searching and installing software
[ redhat@root ~]$ yum install vim #Download vim editor to test whether the replacement is successful
insert image description hereinsert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_63844528/article/details/130580065