更换yum源: 备份原配置 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 阿里云: wget -O /etc/yum.repos.d/CentOS-Base.repo [[http://mirrors.aliyun.com/repo/Centos-7.repo|http://mirrors.aliyun.com/repo/Centos-7.repo]] 清华大学: wget -O /etc/yum.repos.d/CentOS-Base.repo [[https://mirrors.tuna.tsinghua.edu.cn/repo/Centos-7.repo|https://mirrors.tuna.tsinghua.edu.cn/repo/Centos-7.repo]] 网易: wget -O /etc/yum.repos.d/CentOS-Base.repo [[http://mirrors.163.com/.help/CentOS7-Base-163.repo|http://mirrors.163.com/.help/CentOS7-Base-163.repo]] 中科大: wget -O /etc/yum.repos.d/CentOS-Base.repo [[http://mirrors.ustc.edu.cn/centos/7/os/x86_64/|http://mirrors.ustc.edu.cn/centos/7/os/x86_64/]] 清理缓存: yum clean all yum makecache 安装wget(纯净安装的系统没有wget) yum -y install wget 下载配置文件 记得覆盖 curl -O [[http://mirrors.aliyun.com/repo/Centos-7.repo|http://mirrors.aliyun.com/repo/Centos-7.repo]]