1.查看wget是否安装及wget安装卸载方法 rpm -qa |grep "wget" yum install -y wget 安装 yum remove -y wget 卸载 2.备份 /etc/yum.repos.d/CentOS-Base.repo cd /etc/yum.repos.d mv CetOS-Base.repo CentOS-Base.repo.bk 3.下载新的CentOS-Base.repo到/etc/yum.repos.d/ 如下的源用一个就好,三条命令任选其一 //更新为阿里云的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo //更新为163的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS-Base-163.repo //更新为搜狐的源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo 4.运行yum makecache生成缓存 yum clean all yum makecache 5更新系统 yum -y update