Centos修改镜像为国内的阿里云源或者163源等国内源

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

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

 
  1. 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阿里云

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

CentOS 6get

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

第三步:运行yum makecache生成缓存软件

 
  1. yum makecache

 

163安装软件镜像源下载

163开源镜像站是国内比较老的一个网站。不少人都在使用。从这里就能够看出来,网易,果真是业界良心啊。yum

网易开源镜像站:http://mirrors.163.com/文件

CentOS系统更换软件安装源make

第一步:备份你的原镜像文件,以避免出错后能够恢复。备份

 
  1. 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

 
  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo

CentOS 6

 
  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

第三步:运行如下命令生成缓存 

 
  1. yum clean all

 

 
  1. yum makecache

 

固然,除了网易以外,国内还有其余不错的yum源,好比中科大和搜狐的等,你们能够根据本身需求下载

相关文章
相关标签/搜索