CentOS7-更新YUM源

前端之家收集整理的这篇文章主要介绍了CentOS7-更新YUM源前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  • 通过脚本更新YUM源
the first is backup original yum folder to the .bak

sudo mv /etc/yum.repos.d/ /etc/yum.repos.d.bak

new make directory of the /etc/yum.repos.d/

sudo mkdir /etc/yum.repos.d/

download the aliyun yum resource

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

clean cache of the old yum resource

sudo yum clean all

reestablishment yum resource

sudo yum makecache

  • 手动更新YUM源
依次执行上面脚本shell命令即可

猜你在找的CentOS相关文章