使用网易提供的YUM服务

官方链接【CentOS镜像使用帮助】:http://mirrors.163.com/.help/centos.html

首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
CentOS7 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
CentOS6 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
CentOS5 wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

运行以下命令生成缓存

yum clean all
yum makecache

标签: yum

相关文章推荐

添加新评论,含*的栏目为必填