红帽8配置yum源

使用传输工具
上传文件到/etc/yum.repos.d/
在这里插入图片描述


wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
在这里插入图片描述

注:不能下载wget直接上传文件
关闭订阅插件提示
[redhat@root ~]$ vi /etc/yum.conf #添加
plugins=0
[redhat@root ~]$ vim /etc/yum/pluginconf.d/subscription-manager.conf
[main]
enabled=0 #将它禁用掉

#可以粗暴的卸载掉这个模块
[redhat@root ~]$ yum remove subscription-manager
[说明]:
1.当没有禁用plugins的情况下,这里的值为1时,每次yum调用的时候,都会生成或者更新redhat.repo文件
2.这个Subscription Manager订阅管理器,它会一直去重写或者更新/etc/yum.repos.d/redhat.repo文件。

此时已经完成yum的替换
[redhat@root ~]$ yum clean all #清空 yum 缓存,使其设置生效
[redhat@root ~]$ yum repolist #加载服务器软件包缓存信息,提高搜索安装软件的速度
[redhat@root ~]$ yum install vim #下载vim编辑器测试是否替换成功
在这里插入图片描述在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_63844528/article/details/130580065