centos vault镜像

开源镜像

简介

该文件夹提供较早版本的 CentOS,例如 CentOS 6;同时提供当前 CentOS 大版本的历史小版本的归档; 还提供 CentOS 各个版本的源代码。

下载地址:

配置方法

建议先备份 /etc/yum.repos.d/ 内的文件。

#  Centos 6
version=6.10
sudo sed -e "s|^mirrorlist=|#mirrorlist=|g" \
         -e "s|^#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=https://mirrors.ivolces.com/centos-vault/$version|g" \
         -i.bak \
         /etc/yum.repos.d/CentOS-*.repo

# CentOS 8 
version=8.5.2111
sudo sed -e "s|^mirrorlist=|#mirrorlist=|g" \
         -e "s|^#baseurl=http://mirror.centos.org/$contentdir/$releasever|baseurl=https://mirrors.ivolces.com/centos-vault/$version|g" \
         -i.bak \
         /etc/yum.repos.d/CentOS-*.repo

注意其中的 * 通配符,如果只需要替换一些文件中的源,请自行增删。

注意,如果需要启用其中一些 repo,需要将其中的 enabled=0 改为 enabled=1

最后,更新软件包缓存

sudo yum makecache    

相关链接

官方主页:https://vault.centos.org/

342
0
0
0
相关产品
评论
未登录
看完啦,登录分享一下感受吧~
暂无评论