阿里yum源

  1. ‌备份原源‌:mkdir -p /etc/yum.repos.d/backup && mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
  2. ‌下载阿里源配置‌:curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
  3. ‌清理并重建缓存‌:yum clean all && yum makecache
  4. ‌(可选)配置 EPEL 扩展源‌:curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
posted on 2026-08-02 23:02  SZ_文彬  阅读(5)  评论(0)    收藏  举报