如何在 Centos7 中使用阿里云的yum源

1. 备份原来的yum源centos

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup缓存

 

2. 下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/curl

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

或者url

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

执行结果以下图:3d

 

3. 清理缓存blog

sudo yum clean allget

执行结果:下载

 

4. 生成新的缓存

sudo yum makecache

执行结果:

 

相关连接:

阿里云开源镜像站

相关文章
相关标签/搜索