news 2026/7/17 17:05:47

CentOS Stream 9配置yum源

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CentOS Stream 9配置yum源

文章目录

      • Red Hat 9 && CentOS Stream 9 配置阿里云yum 源
        • CentOS Stream 9 配置阿里云 yum 源
        • Red Hat 9 配置阿里云 yum 源

Red Hat 9 && CentOS Stream 9 配置阿里云yum 源

CentOS Stream 9 配置阿里云 yum 源

备份原有的 yum文件

[root@localhost ~]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# lscentos-addons.repo centos.repo[root@localhost yum.repos.d]# mkdir bak[root@localhost yum.repos.d]# cp -r *.repo bak/

配置阿里 yum 源

[root@localhost yum.repos.d]# pwd/etc/yum.repos.d[root@localhost yum.repos.d]# vim centos.repo[baseos]name=CentOS Stream$releasever- BaseOSbaseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=1[baseos-debug]name=CentOS Stream$releasever- BaseOS - Debugbaseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[baseos-source]name=CentOS Stream$releasever- BaseOS - Sourcebaseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[appstream]name=CentOS Stream$releasever- AppStreambaseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=1[appstream-debug]name=CentOS Stream$releasever- AppStream - Debugbaseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[appstream-source]name=CentOS Stream$releasever- AppStream - Sourcebaseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[crb]name=CentOS Stream$releasever- CRBbaseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=0[crb-debug]name=CentOS Stream$releasever- CRB - Debugbaseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[crb-source]name=CentOS Stream$releasever- CRB - Sourcebaseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0
[root@localhost yum.repos.d]# pwd/etc/yum.repos.d[root@localhost yum.repos.d]# vim centos-addons.repo[highavailability]name=CentOS Stream$releasever- HighAvailabilitybaseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=0[highavailability-debug]name=CentOS Stream$releasever- HighAvailability - Debugbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[highavailability-source]name=CentOS Stream$releasever- HighAvailability - Sourcebaseurl=http://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[nfv]name=CentOS Stream$releasever- NFVbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=0[nfv-debug]name=CentOS Stream$releasever- NFV - Debugbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[nfv-source]name=CentOS Stream$releasever- NFV - Sourcebaseurl=http://mirrors.aliyun.com/centos-stream/$stream/NFV/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[rt]name=CentOS Stream$releasever- RTbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=0[rt-debug]name=CentOS Stream$releasever- RT - Debugbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[rt-source]name=CentOS Stream$releasever- RT - Sourcebaseurl=http://mirrors.aliyun.com/centos-stream/$stream/RT/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[resilientstorage]name=CentOS Stream$releasever- ResilientStoragebaseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/os/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=0[resilientstorage-debug]name=CentOS Stream$releasever- ResilientStorage - Debugbaseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/debug/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[resilientstorage-source]name=CentOS Stream$releasever- ResilientStorage - Sourcebaseurl=http://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/source/tree/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0[extras-common]name=CentOS Stream$releasever- Extras packagesbaseurl=http://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/$basearch/extras-common/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512gpgcheck=1repo_gpgcheck=0metadata_expire=6hcountme=1enabled=1[extras-common-source]name=CentOS Stream$releasever- Extras packages - Sourcebaseurl=http://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/source/extras-common/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512gpgcheck=1repo_gpgcheck=0metadata_expire=6henabled=0
[root@localhost yum.repos.d]# dnf clean all # 清除缓存21个文件已删除[root@localhost yum.repos.d]#[root@localhost yum.repos.d]# dnf makecache # 建立缓存.......[root@localhost yum.repos.d]# dnf update # 更新

Red Hat 9 配置阿里云 yum 源
[root@localhost ~]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# vi /etc/yum.repos.d/redhat9.repo[ali_baseos]name=ali_baseosbaseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/gpgcheck=0[ali_appstream]name=ali_appstreambaseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/x86_64/os/gpgcheck=0[root@localhost yum.repos.d]# dnf clean all # 清除缓存21个文件已删除[root@localhost yum.repos.d]#[root@localhost yum.repos.d]# dnf makecache # 建立缓存.......[root@localhost yum.repos.d]# dnf update # 更新
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/17 17:04:05

Marge-bot 监控和日志分析:实时跟踪自动合并状态的最佳实践

Marge-bot 监控和日志分析:实时跟踪自动合并状态的最佳实践 【免费下载链接】marge-bot A merge-bot for GitLab 项目地址: https://gitcode.com/gh_mirrors/ma/marge-bot Marge-bot 是一款专为 GitLab 设计的自动合并机器人,能够帮助开发团队简化…

作者头像 李华
网站建设 2026/7/17 17:04:02

BI平台云原生架构:从容器化到弹性扩展的技术演进

引言当BI平台从"企业内部的一个工具"进化为"嵌入在数十个业务系统中的基础设施"时,其架构面临着全新的技术挑战:如何支撑200租户的并发查询?如何在流量高峰期自动扩容?如何在不中断服务的情况下完成版本升级&…

作者头像 李华
网站建设 2026/7/17 17:02:47

3个核心功能:用Zotero Style插件打造个性化文献管理界面

3个核心功能:用Zotero Style插件打造个性化文献管理界面 【免费下载链接】zotero-style Ethereal Style for Zotero 项目地址: https://gitcode.com/GitHub_Trending/zo/zotero-style 如果你正在寻找一款能让Zotero文献管理工具焕然一新的插件,那…

作者头像 李华
网站建设 2026/7/17 17:00:08

Windows系统安装苹果苹方字体终极指南:3分钟提升视觉体验

Windows系统安装苹果苹方字体终极指南:3分钟提升视觉体验 【免费下载链接】PingFangSC PingFangSC字体包文件、苹果平方字体文件,包含ttf和woff2格式 项目地址: https://gitcode.com/gh_mirrors/pi/PingFangSC 还在为Windows系统缺乏优雅的中文字…

作者头像 李华
网站建设 2026/7/17 16:58:19

如何构建终极CoreXY 3D打印机:Voron 2.4的完整指南

如何构建终极CoreXY 3D打印机:Voron 2.4的完整指南 【免费下载链接】Voron-2 Voron 2 CoreXY 3D Printer design 项目地址: https://gitcode.com/gh_mirrors/vo/Voron-2 在开源3D打印机领域,Voron 2.4以其创新的CoreXY架构和四电机龙门式Z轴系统重…

作者头像 李华