[1] 首先備份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[2] 進入yum源配置檔案所在資料夾
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
[3] 下載163的yum源配置檔案,放入/etc/yum.repos.d/(操作前請做好相應備份)
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
[4] 執行yum makecache生成快取
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum makecache
[5] 更新系統
[root@localhost yum.repos.d]# yum -y update