Centos yum源替换为阿里云源

作者:Rui 发布时间:June 2, 2016 分类:Linux,CLOUD 浏览:608

备份系统原镜像文件

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

下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5

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

CentOS 6

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

运行yum makecache生成缓存

yum clean all
yum makecache

标签: linux, centos, yum

添加新评论 »