配置您的系统以使用默认存储库
YUM 存储库已可以从
http://foundation0.ilt.example.com/dvd/BaseOS 和
http://foundation0.ilt.example.com/dvd/AppStream
使用配置您的系统,以将这些位置用作默认存储库
Option A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   | [root@node1 ~]# rpm -ivh http://foundation0.ilt.example.com/dvd/BaseOS/Packages/yum-utils-4.0.12-3.el8.noarch.rpm Retrieving http://foundation0.ilt.example.com/dvd/BaseOS/Packages/yum-utils-4.0.12-3.el8.noarch.rpm warning: /var/tmp/rpm-tmp.3ndcXQ: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Verifying...                          ################################# [100%] Preparing...                          ################################# [100%] Updating / installing...    1:yum-utils-4.0.12-3.el8           ################################# [100%] [root@node1 ~]# yum-config-manager --add-repo http://foundation0.ilt.example.com/dvd/BaseOS Adding repo from: http://foundation0.ilt.example.com/dvd/BaseOS [root@node1 ~]# yum-config-manager --add-repo http://foundation0.ilt.example.com/dvd/AppStream Adding repo from: http://foundation0.ilt.example.com/dvd/AppStream [root@node1 ~]# find / -name "*GPG-KEY*" /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [root@node1 ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [root@node1 ~]# yum repolist all  repo id                                                                          repo name                                                                                                                  status foundation0.ilt.example.com_dvd_AppStream                                        created by dnf config-manager from http://foundation0.ilt.example.com/dvd/AppStream                                        enabled foundation0.ilt.example.com_dvd_BaseOS                                           created by dnf config-manager from http://foundation0.ilt.example.com/dvd/BaseOS                                           enabled
   | 
 
Option B
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
   | [root@node1 ~]# man yum.conf  [root@node1 ~]# vim /etc/yum.repos.d/defaults.repo # defaults.repo [BaseOS] name=BaseOS baseurl=http://foundation0.ilt.example.com/dvd/BaseOS enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  [AppStream] name=AppStream baseurl=http://foundation0.ilt.example.com/dvd/AppStream enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
   |