参照清华大学开源软件镜像站设置:
地址:
https://mirrors.tuna.tsinghua.edu.cn/help/centos/
1、首先备份 CentOS-Base.repo
CentOS-Base.repo路径: /etc/yum.repos.d/CentOS-Base.repo
#cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-old
2、打开CentOS-Base.repo文件
vim /etc/yum.repos.d/CentOS-Base.repo
3、修改CentOS-Base.repo文件,修改后的文件如下
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless yo