centos6.7更换yum源

浏览次数:1551 关键词 ( yum  )

1. 备份源文件
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. 下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

# wget -O /etc/yum.repos.d/CentOS-Base.repo img/20170809/y3duec5uleq.repo

CentOS 6

# wget -O /etc/yum.repos.d/CentOS-Base.repo img/20170809/5zetc02drr5.repo

CentOS 7

# wget -O /etc/yum.repos.d/CentOS-Base.repo img/20170809/jefx2ychhp0.repo
3. 生成缓存
# yum makecache

参考: img/20170809/k0nwkk3to4t