cd /etc cd /etc/yum.repos.d/ mv CentOS-Base.repo CentOS-Base.repo.back #建议备份或者改名 wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo yum makecache #生成缓存