给centos重新安装yum的base-repo源
如果自己的centos的系统yum源出现问题了,如何才能修复? 方式一:使用国内的阿里云镜像 (1)把/etc/yum.repos.d/下面所有的源给删除掉了 (2)下载镜像 # CentOS 5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo # CentOS 6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo # CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 注意如果没有安装wget,可以从下面的网址中先手动下载,然后上传到linux上安装:http://www.rpmfind.net/linux/rpm2html/search.php?query=wget (3)执行命令,重新生成cache yum clean all yum makecache 方式二:使用官网的镜像 (1)把/etc/yum.repos.d/下面所有的源给删除掉了 (2)执行以下命令查看centos的版本 cat