记录:rhel中yum换centos源
  • 删除原来的yum
rpm -qa | grep yum | xargs rpm -e --nodeps
  • 使用curlwgethttp://mirrors.163.com/centos/7/os/x86_64/下载yum及其依赖安装包,包括yumyum-metadata-parseryum-plugin-fastestmirrorpython-urlgrabber并安装。如果出现冲突则使用rpm -i --force --nodeps强制安装。有可能需要升级rpm,同样下载安装包并强制安装。

  • http://mirrors.163.com的centos帮助文档中获取对应的repo文件,放入/etc/yum.d.repo/,然后执行:


yum clean all
yum makecache

Author: SinLapis
Link: http://sinlapis.github.io/2017/12/24/记录:rhel中yum换centos源/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.