加入收藏 | 设为首页 | 会员中心 | 我要投稿 十堰站长网 (https://www.0719zz.com/)- 混合云存储、网络、视频终端、云计算、媒体处理!
当前位置: 首页 > 综合聚焦 > CentOS > 正文

CentOS7-更新YUM源

发布时间:2020-09-02 01:18:43 所属栏目:CentOS 来源:互联网
导读:- 通过脚本更新YUM源 ```console #!/usr/bin/env bash # 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

  • 通过脚本更新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命令即可

(编辑:十堰站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读