centos7更换下载源

centos7更换镜像源

1.备份原有镜像源

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

2.下载并重命名阿里源

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

3.清理并生成新缓存

yum clean all
yum makecache

image-20210624153312888

posted @ 2021-06-25 09:10  Harry_666  阅读(1289)  评论(0编辑  收藏  举报