yum源调整为阿里云源记录

来源:互联网 发布:付磊 武汉大学 知乎 编辑:程序博客网 时间:2024/06/11 01:26

鉴于国外的yum源经常连不上,切换成国内的yum源,我们首选阿里的

备份

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

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

CentOS 6

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

CentOS 7

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

之后运行yum makecache生成缓存

yum clean all

yum makecache



转载于http://blog.csdn.net/jiangguilong2000/article/details/70766832

0 0