
文章目录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文件[rootlocalhost ~]# cd /etc/yum.repos.d/[rootlocalhost yum.repos.d]# lscentos-addons.repo centos.repo[rootlocalhost yum.repos.d]# mkdir bak[rootlocalhost yum.repos.d]# cp -r *.repo bak/配置阿里 yum 源[rootlocalhost yum.repos.d]# pwd/etc/yum.repos.d[rootlocalhost yum.repos.d]# vim centos.repo[baseos]nameCentOS Stream$releasever- BaseOSbaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled1[baseos-debug]nameCentOS Stream$releasever- BaseOS - Debugbaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[baseos-source]nameCentOS Stream$releasever- BaseOS - Sourcebaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/BaseOS/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[appstream]nameCentOS Stream$releasever- AppStreambaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled1[appstream-debug]nameCentOS Stream$releasever- AppStream - Debugbaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[appstream-source]nameCentOS Stream$releasever- AppStream - Sourcebaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[crb]nameCentOS Stream$releasever- CRBbaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled0[crb-debug]nameCentOS Stream$releasever- CRB - Debugbaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[crb-source]nameCentOS Stream$releasever- CRB - Sourcebaseurlhttps://mirrors.aliyun.com/centos-stream/$stream/CRB/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[rootlocalhost yum.repos.d]# pwd/etc/yum.repos.d[rootlocalhost yum.repos.d]# vim centos-addons.repo[highavailability]nameCentOS Stream$releasever- HighAvailabilitybaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled0[highavailability-debug]nameCentOS Stream$releasever- HighAvailability - Debugbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[highavailability-source]nameCentOS Stream$releasever- HighAvailability - Sourcebaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/HighAvailability/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[nfv]nameCentOS Stream$releasever- NFVbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled0[nfv-debug]nameCentOS Stream$releasever- NFV - Debugbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/NFV/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[nfv-source]nameCentOS Stream$releasever- NFV - Sourcebaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/NFV/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[rt]nameCentOS Stream$releasever- RTbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled0[rt-debug]nameCentOS Stream$releasever- RT - Debugbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/RT/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[rt-source]nameCentOS Stream$releasever- RT - Sourcebaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/RT/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[resilientstorage]nameCentOS Stream$releasever- ResilientStoragebaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/os/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled0[resilientstorage-debug]nameCentOS Stream$releasever- ResilientStorage - Debugbaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/$basearch/debug/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[resilientstorage-source]nameCentOS Stream$releasever- ResilientStorage - Sourcebaseurlhttp://mirrors.aliyun.com/centos-stream/$stream/ResilientStorage/source/tree/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficialgpgcheck1repo_gpgcheck0metadata_expire6henabled0[extras-common]nameCentOS Stream$releasever- Extras packagesbaseurlhttp://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/$basearch/extras-common/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512gpgcheck1repo_gpgcheck0metadata_expire6hcountme1enabled1[extras-common-source]nameCentOS Stream$releasever- Extras packages - Sourcebaseurlhttp://mirrors.aliyun.com/centos-stream/SIGs/$stream/extras/source/extras-common/gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512gpgcheck1repo_gpgcheck0metadata_expire6henabled0[rootlocalhost yum.repos.d]# dnf clean all # 清除缓存21个文件已删除[rootlocalhost yum.repos.d]#[rootlocalhost yum.repos.d]# dnf makecache # 建立缓存.......[rootlocalhost yum.repos.d]# dnf update # 更新Red Hat 9 配置阿里云 yum 源[rootlocalhost ~]# cd /etc/yum.repos.d/[rootlocalhost yum.repos.d]# vi /etc/yum.repos.d/redhat9.repo[ali_baseos]nameali_baseosbaseurlhttps://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/gpgcheck0[ali_appstream]nameali_appstreambaseurlhttps://mirrors.aliyun.com/centos-stream/9-stream/AppStream/x86_64/os/gpgcheck0[rootlocalhost yum.repos.d]# dnf clean all # 清除缓存21个文件已删除[rootlocalhost yum.repos.d]#[rootlocalhost yum.repos.d]# dnf makecache # 建立缓存.......[rootlocalhost yum.repos.d]# dnf update # 更新