最新内容和地址参见http://mirrors.163.com/.help/centos.html
1 首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2 以CentOS6.5为例,下载并重命名repo文件
cd /etc/yum.repos.d/ wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163.repo CentOS-Base.repo
3 重新生成yum缓存
yum clean all yum makecache
时间: 2024-10-20 03:28:57