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 # 更新