一、本地源[rootZXY ~]# mount /dev/sr0 /mnt [rootZXY ~]# ls /mnt/ AppStream EFI Flatpaks media.repo BaseOS EULA GPL RPM-GPG-KEY-redhat-beta boot extra_files.json images RPM-GPG-KEY-redhat-release [rootZXY ~]# vim /etc/yum.repos.d/rhel10.repo #建立本地 yum 源配置文件 [BaseOS] nameBaseOS baseurlfile:///mnt/BaseOS gpgcheck0 [AppStream] nameAppStream baseurlfile:///mnt/AppStream gpgcheck0 #清空缓存 [rootZXY ~]# yum clean all Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use rhc or subscription-manager to register. 0 files removed # 生成新的 yum 缓存 [rootZXY ~]# yum makecache Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use rhc or subscription-manager to register. BaseOS 96 MB/s | 1.5 MB 00:00 AppStream 179 MB/s | 1.5 MB 00:00 Metadata cache created.二、网络源[rootZXY ~]# vim /etc/yum.repos.d/ali.repo #在配置文件配置 yum 源 nameali-BaseOS baseurlhttps://mirrors.aliyun.com/rockylinux/10/BaseOS/x86_64/os/ gpgcheck0 [ali-AppStream] nameali-AppStream baseurlhttps://mirrors.aliyun.com/rockylinux/10/AppStream/x86_64/os/ gpgcheck0 [rootZXY ~]# yum clean all [rootZXY ~]# yum makecache三、EPEL扩展源[rootZXY ~]# vim /etc/yum.repos.d/epel.repo [epel] nameepel baseurlhttps://mirrors.aliyun.com/epel/10/Everything/x86_64/ gpgcheck0 [rootZXY ~]# yum clean all [rootZXY ~]# yum makecache