【云服务器BCC】Centos-stream镜像
2025.12.04 17:43浏览量:8简介:本文提供在云服务器 BCC 中部署和配置 Centos-stream镜像的基本指引。
概述
基于Red Hat的开源企业级操作系统(Linux发行版),本目录仅提供 CentOS Stream 9,非 Stream 版的 CentOS 已经停止支持。
下载地址:http://mirrors.baidubce.com/centos-stream/
配置方法
1. 备份原有 repo 文件
mkdir -p /etc/yum.repos.d/backupmv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
2. 创建百度镜像源配置文件
cat > /etc/yum.repos.d/baidu.repo << 'EOF'[baseos]name=CentOS Stream $releasever - BaseOS - Baidubaseurl=http://mirrors.baidubce.com/centos-stream/9-stream/BaseOS/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial[appstream]name=CentOS Stream $releasever - AppStream - Baidubaseurl=http://mirrors.baidubce.com/centos-stream/9-stream/AppStream/$basearch/os/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialEOF
3. 清理并重建缓存
yum clean allyum makecache
4. 验证源是否生效
Repository baseos is listed more than once in the configurationRepository appstream is listed more than once in the configurationrepo id repo nameappstream CentOS Stream 9 - AppStream - Baidubaseos CentOS Stream 9 - BaseOS - Baiduepel Extra Packages for Enterprise Linux 9 - x86_64epel-next Extra Packages for Enterprise Linux 9 - Next - x86_64

发表评论
登录后可评论,请前往 登录 或 注册