先进入yum源配置目录
cd /etc/yum.repos.d
备份系统自带的yum源
mv CentOS-Base.repo CentOS-Base.repo.save
163的yum源:
wget http://mirrors.163.com/.help/CentOS6-Base-163.reposohu的yum源:
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
或者:cd /etc/yum.repos.d/; wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O 163.repo; sed -i -e "s/\$releasever/6.6/g" -e "s/gpgcheck=1/gpgcheck=0/g" -e "28,35d" 163.repo; yum makecache
(记得替换$releasever为6.6或者5.10)
更新玩yum源后,建议更新一下,使操作立即生效
yum makecache