centos更换yum源
centos7更换为国内yum源
备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
更新yum源
这里的命令是centos7的更新命令,可以根据自己的的版本替换一下
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
更新缓存
yum makecache