Centos 7停止维护后的,换源策略

Centos 7停止维护后的,换源策略

centos7 已经停止维护了,现在yum在没有换源的情况下都用不了了。

这时候我们先换到aliyun的源,目前还可以用。

一、备份现有源文件:

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

二、下载阿里云的源配置文件:

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

没有安装wget的时候用

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

三、清除缓存并生成新的缓存:

sudo yum clean all
sudo yum makecache

感谢您的来访,获取更多精彩文章请收藏本站。

THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容