CentOS7配置阿里云镜像

一、切换更新前先备份执行

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

二、下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/

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

三、运行yum makecache生成缓存

yum makecache

四、yum更新

yum update

本文参考:https://developer.aliyun.com/article/841760

0%