centos7修改yum源为阿里镜像(镜像源)

备份系统镜像源

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

下载阿里镜像源

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

运行yum makecache生成缓存

yum makecache

安装epel源

yum install epel-release

 

posted @ 2023-01-16 16:25  John_2011  阅读(700)  评论(0)    收藏  举报