CentOS 7-10 可用镜像源整理

更新时间:2026-04-17


版本状态总览

版本 状态 EOL 时间 说明
CentOS 7 已停服 2024-06-30 需使用 Vault 归档源
CentOS 8 已停服 2021-12-31 需切换至 CentOS Stream 8 或 Vault
CentOS Stream 8 已停服 2024-05-31 官方已结束支持
CentOS Stream 9 活跃维护 2027-05-31 推荐使用
CentOS Stream 10 活跃维护 2029-12-31 最新版本

CentOS 7 镜像源(Vault 归档)

CentOS 7 已于 2024 年 6 月 30 日停止维护,标准镜像源已失效,需切换到 Vault 归档源

可用镜像

镜像站 基础地址 说明
官方 Vault http://vault.centos.org/7.9.2009/ 官方归档,速度较慢
阿里云 https://mirrors.aliyun.com/centos-vault/ 国内推荐,速度快
清华大学 https://mirrors.tuna.tsinghua.edu.cn/centos-vault/ 教育网推荐
华为云 https://mirrors.huaweicloud.com/centos-vault/ 国内可用
网易 https://mirrors.163.com/centos-vault/ 国内可用
USTC https://mirrors.ustc.edu.cn/centos-vault/ 教育网可用

阿里云 Vault 源配置

1
2
3
4
5
6
7
8
9
10
11
12
# 备份原有 repo 文件
cd /etc/yum.repos.d/
mkdir -p bak
mv *.repo bak/

# 下载阿里云 Vault 源配置
wget -O /etc/yum.repos.d/CentOS-Base.repo \
https://mirrors.aliyun.com/repo/Centos-vault-7.9.2009.repo

# 清理缓存并重建
yum clean all
yum makecache

手动配置 .repo 文件(官方 Vault)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[base]
name=CentOS-7.9.2009 - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[updates]
name=CentOS-7.9.2009 - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[extras]
name=CentOS-7.9.2009 - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

[centosplus]
name=CentOS-7.9.2009 - CentOSPlus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0

CentOS 8 镜像源(Vault 归档)

CentOS 8 已于 2021 年 12 月 31 日停止维护。

可用镜像

镜像站 基础地址 说明
官方 Vault http://vault.centos.org/8.5.2111/ 官方归档
阿里云 https://mirrors.aliyun.com/centos-vault/ 国内推荐
清华大学 https://mirrors.tuna.tsinghua.edu.cn/centos-vault/ 教育网推荐
华为云 https://mirrors.huaweicloud.com/centos-vault/ 国内可用

阿里云 CentOS Stream 8 源配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cd /etc/yum.repos.d/
mkdir -p bak
mv *.repo bak/

# 使用阿里云 CentOS Stream 8 源
cat > /etc/yum.repos.d/CentOS-Stream-BaseOS.repo << 'EOF'
[baseos]
name=CentOS Stream 8 - BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/8-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[appstream]
name=CentOS Stream 8 - AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/8-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF

yum clean all
yum makecache

CentOS Stream 8 镜像源

CentOS Stream 8 已于 2024 年 5 月 31 日结束支持,以下源可能已不再更新。

镜像站 基础地址
官方 Stream https://mirror.stream.centos.org/8-stream/
阿里云 https://mirrors.aliyun.com/centos-stream/8-stream/
清华大学 https://mirrors.tuna.tsinghua.edu.cn/centos-stream/8-stream/
华为云 https://mirrors.huaweicloud.com/centos-stream/8-stream/

CentOS Stream 9 镜像源

CentOS Stream 9 当前活跃维护中,推荐使用。

可用镜像

镜像站 基础地址 说明
官方 Stream https://mirror.stream.centos.org/9-stream/ 官方上游
阿里云 https://mirrors.aliyun.com/centos-stream/9-stream/ 国内推荐
清华大学 https://mirrors.tuna.tsinghua.edu.cn/centos-stream/9-stream/ 教育网推荐
华为云 https://mirrors.huaweicloud.com/centos-stream/9-stream/ 国内可用
网易 https://mirrors.163.com/centos-stream/ 国内可用
USTC https://mirrors.ustc.edu.cn/centos-stream/9-stream/ 教育网可用

阿里云 CentOS Stream 9 源配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cd /etc/yum.repos.d/
mkdir -p bak
mv *.repo bak/

cat > /etc/yum.repos.d/centos.repo << 'EOF'
[baseos]
name=CentOS Stream 9 - BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1

[appstream]
name=CentOS Stream 9 - AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1

[crb]
name=CentOS Stream 9 - CRB
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/CRB/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1
EOF

dnf clean all
dnf makecache

CentOS Stream 10 镜像源

CentOS Stream 10 于 2025 年 7 月发布,当前活跃维护中,最新版本。

可用镜像

镜像站 基础地址 说明
官方 Stream https://mirror.stream.centos.org/10-stream/ 官方上游
阿里云 https://mirrors.aliyun.com/centos-stream/10-stream/ 国内推荐
清华大学 https://mirrors.tuna.tsinghua.edu.cn/centos-stream/10-stream/ 教育网推荐
华为云 https://mirrors.huaweicloud.com/centos-stream/10-stream/ 国内可用

阿里云 CentOS Stream 10 源配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cd /etc/yum.repos.d/
mkdir -p bak
mv *.repo bak/

cat > /etc/yum.repos.d/centos.repo << 'EOF'
[baseos]
name=CentOS Stream 10 - BaseOS
baseurl=https://mirrors.aliyun.com/centos-stream/10-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1

[appstream]
name=CentOS Stream 10 - AppStream
baseurl=https://mirrors.aliyun.com/centos-stream/10-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1

[crb]
name=CentOS Stream 10 - CRB
baseurl=https://mirrors.aliyun.com/centos-stream/10-stream/CRB/$basearch/os/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
enabled=1
EOF

dnf clean all
dnf makecache

EPEL 扩展源镜像

CentOS 各版本常用的 EPEL 扩展源:

镜像站 CentOS 7 EPEL CentOS Stream 9/10 EPEL
阿里云 https://mirrors.aliyun.com/epel/7/ https://mirrors.aliyun.com/epel/9/
清华大学 https://mirrors.tuna.tsinghua.edu.cn/epel/7/ https://mirrors.tuna.tsinghua.edu.cn/epel/9/
华为云 https://mirrors.huaweicloud.com/epel/7/ https://mirrors.huaweicloud.com/epel/9/

常用镜像站主页

镜像站 地址
阿里云开源镜像站 https://mirrors.aliyun.com/
清华大学开源镜像站 https://mirrors.tuna.tsinghua.edu.cn/
华为开源镜像站 https://mirrors.huaweicloud.com/
网易开源镜像站 https://mirrors.163.com/
中科大开源镜像站 https://mirrors.ustc.edu.cn/
官方 CentOS Mirror https://www.centos.org/download/mirrors/
官方 CentOS Stream https://mirror.stream.centos.org/

迁移建议

当前版本 推荐迁移目标 说明
CentOS 7 Rocky Linux 9 / AlmaLinux 9 最佳兼容性,1:1 兼容 RHEL
CentOS 7 CentOS Stream 9 最小改动迁移
CentOS 8 Rocky Linux 8 / AlmaLinux 8 RHEL 8 兼容替代
CentOS Stream 8 CentOS Stream 9 升级到活跃版本
CentOS Stream 9 继续使用 仍在维护期内