以163源为例 首先备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup # cd /etc/yum.repos.d # mv CentOS-Base.repo CentOS-Base.repo.backup # wget # mv CentOS6-Base-163.repo CentOS6-Base.repo 运行以下命令生成缓存 #yum clean all #yum makecache(责任编辑:IT) |