centos适用的国内yum源:网易、搜狐

默认的yum源是centos官网的,速度慢是不用说了。所以使用yum安装东西之前需要把yum源改为国内的。
参考 http://mirrors.163.com/.help/centos.html 和 http://mirrors.sohu.com/help/centos.html 中的介绍。
设置方法如下:


1,进入yum源配置目录
cd /etc/yum.repos.d
2,备份系统自带的yum源
mv CentOS-Base.repo CentOS-Base.repo.bak
下载163网易的yum源:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
更改文件名
mv CentOS6-Base-163.repo CentOS-Base.repo
3,更新完yum源后,执行下边命令更新yum配置,使操作立即生效
yum clean all
yum makecache
4,除了网易之外,国内还有其他不错的yum源,比如搜狐的
sohu的yum源: http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
中科大的yum源:http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=2

原文地址:https://www.cnblogs.com/chenqionghe/p/4296004.html