CentOS 7 切换为阿里源

CentOS 7 切换为阿里源


  • 切到/etc/yum.repos.d/ 并备份原本的yum

    cd /etc/yum.repos.d/

    mv CentOs-Base.repo CentOs-Base.repo.bak


  • 下载阿里云的yum

    wget http://mirrors.aliyun.com/repo/Centos-7.repo

    mv Centos-7.repo CentOs-Base.repo


  • 执行yum源更新命令

    yum clean all && yum makecache

    yum -y update


--- END ---

posted @ 2019-12-28 15:28  君无颜  阅读(1108)  评论(0编辑  收藏  举报