4.3. 使用 reposync 同步 RPM 存储库
要执行 reposync,您需要一个可以访问互联网的 RHEL 主机。同步仓库后,您可以将仓库移到从 Web 服务器托管的断开连接的网络中。
流程
附加 BaseOS 和 AppStream 所需的软件仓库:
subscription-manager repos \ --enable rhel-8-for-x86_64-baseos-rpms \ --enable rhel-8-for-x86_64-appstream-rpms# subscription-manager repos \ --enable rhel-8-for-x86_64-baseos-rpms \ --enable rhel-8-for-x86_64-appstream-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 执行 reposync :
dnf install yum-utils reposync -m --download-metadata --gpgcheck \ -p /path/to/download# dnf install yum-utils # reposync -m --download-metadata --gpgcheck \ -p /path/to/downloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow 使用带有
--download-metadata且不带--newest-only的 reposync。请参阅 RHEL 8 Reposync。-
如果您不使用
--newest-only,则下载的仓库为 ~90GB。 -
如果您只使用
--newest-only,则下载的仓库为 ~14GB。
-
如果您不使用
如果您计划使用 Red Hat Single Sign-On,请同步这些软件仓库:
- jb-eap-7.3-for-rhel-8-x86_64-rpms
- rh-sso-7.4-for-rhel-8-x86_64-rpms
完成 reposync 后,您的仓库就可以与 web 服务器一起使用。
- 将仓库移到断开连接的网络中。