ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 将Centos的yum源更换为国内的阿里云源

将Centos的yum源更换为国内的阿里云源

Linux操作系统 作者:yang1721 时间:2015-12-28 18:49:58 0 删除 编辑

将Centos的yum源更换为国内的阿里云源

参考: http://www.centoscn.com/CentOS/config/2015/0416/5189.html 

阿里云Linux安装软件镜像源

阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/

CentOS系统更换软件安装源
第一步:备份你的原镜像文件,以免出错后可以恢复。

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


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16674653/viewspace-1966165/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-04-28

  • 博文量
    26
  • 访问量
    103917