把CentOS-Base.repo里面的
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
这个属性注释掉
baseurl=https://mirrorlist.centos.org/centos/$releasever/os/$basearch/
$releasever这个一定要改系统对应版本
https://mirrors.aliyun.com/centos-vault/ 这个换成国内的源
清华大学开源软件镜像站 | Tsinghua Open Source Mirror
我的centos是6.6 改
baseurl=https://mirrors.aliyun.com/centos-vault/6.6/updates/$basearch/
改好
# 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.