更换yum源为阿里云源

  1. 切换到/etc/yum.repos.d/目录下cd /etc/yum.repos.d

  2. (推荐)备份原有yum源文件mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

  3. 下载阿里云yum源wget -O /etc//yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo CentOS-7.repo(以Centos7为例)

  4. 清理yum缓存yum clean all

  5. 生成新的yum缓存yum makecache

posted @ 2021-09-14 09:52  limonene0x  阅读(1520)  评论(0编辑  收藏  举报