替换默认源为163源:
wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
mv CentOS5-Base-163.repo /etc/yum.repos.d/
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
yum makecache
yum源改回去:
mv /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo
rm -f /etc/yum.repos.d/CentOS5-Base-163.repo
yum makecache