Centos 更新yum源 改成163源

首先备份源:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

备份之前的源BASE,进入对应目录。

cd /etc/yum.repos.d/

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

mv CentOS7-Base-163.repo CentOS-Base.repo

刷新YUM的缓存状态:

yum clean all

yum makecache

yum update

你可能感兴趣的:(CentOS)