Redhat8.0 配置使用阿里源
关闭官方订阅
- 在配置文件中关闭这个官方的订阅
编辑文件“ /etc/yum/pluginconf.d/subscription-manager.conf”,更改参数“ enabled = 1”到“ enabled = 0”
vim /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0
- 删除 官方订阅
yum remove subscription-manager
RedHat8更换CentOS阿里云镜像源
1.备份
mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.repo.bak
2.下载新的CentOS-Base.repo 到 /etc/yum.repos.d/ (这里用的CentOS 8.0)
wget -O /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo
#或者
curl -o /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo
3、清除缓存,生成缓存
yum clean all
4、 生存缓存
yum makecache