原创

Centos配置国内yum源(yum安装源)

国内的阿里云源,网易163yum源是国内最好的yum源之一 ,无论是速度还是软件版本,都非常的不错,将yum源设置为阿里云或163,可以提升软件包安装和更新的速度,同时避免一些常见软件版本无法找到。具体设置方法如下:
1,进入yum源配置目录
cd /etc/yum.repos.d
2,备份系统自带的yum源

mv CentOS-Base.repo CentOS-Base.repo.bak

mv epel.repo epel.repo.bak


CentOS 7 yum源(epel.repo,CentOS-Base.repo)更换为国内的阿里云源

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

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

CentOS 6

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

更新玩yum源后,执行下边命令更新yum配置,使操作立即生效
yum clean all
yum makecache


附加:

163网易的yum源:

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

中科大的yum源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://centos.ustc.edu.cn/CentOS-Base.repo
sohu的yum源
wgetwget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

理论上讲,这些yum源redhat系统以及fedora也是可以用 的,但是没有经过测试,需要的站长可以自己测试一下。
正文到此结束
本文目录