更改Centos6的yum源

一、阿里云Linux安装软件镜像源centos

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

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

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

第二步:下载新的CentOS-Base.repo /etc/yum.repos.d/
阿里云

CentOS 6spa

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

CentOS 5code

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

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

yum clean all
yum makecache

二、163安装软件镜像源class

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

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

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.163.com/.help/CentOS6-Base-163.repo

CentOS 5

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

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

yum clean all
yum makecache

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

中科大的Linux安装镜像源:http://centos.ustc.edu.cn/

搜狐的Linux安装镜像源:http://mirrors.sohu.com/