国内访问centos官方镜像源速度还是跟阿里云镜像源有差距
这里记录下如何配置阿里云镜像源,包括基础包镜像源和epel镜像源
centos镜像源文件放在了目录 /etc/yum.repos.d
我一般是不保留原来的镜像源文件的,如果你想保留用mv命令修改一下名称
首先下载wget
yum install wget
删除原有的镜像源文件
rm -f /etc/yum.repos.d/*
下载基础源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
下载epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
最后更新镜像源
yum clean all
yum makecache
本文介绍了如何为CentOS系统配置阿里云镜像源,以加快软件包的下载速度。通过删除原有镜像源文件,然后下载并安装阿里云的基础包和EPEL镜像源,最后更新缓存,可以显著提高yum操作的效率。
761

被折叠的 条评论
为什么被折叠?



