B.2. 为 Red Hat Enterprise Linux 8 导入 Kickstart 存储库


使用这个流程为 Red Hat Enterprise Linux 8 导入 Kickstart 软件仓库。

流程

  1. 访问 access.redhat.com/downloads 并登录红帽客户门户网站。
  2. 点击 Red Hat Enterprise Linux
  3. 从列表中选择一个产品变体和产品版本。例如,产品变体 Red Hat Enterprise Linux for x86_64 和 product version 8.1
  4. 找到完整安装镜像,例如 Red Hat Enterprise Linux 8.1 Binary DVD,并点 Download Now
  5. 下载完成后,将 ISO 镜像复制到卫星服务器。
  6. 在卫星服务器上,创建一个挂载点,并在该位置临时挂载 ISO 镜像:

    # mkdir /mnt/iso
    # mount -o loop rhel-binary-dvd.iso /mnt/iso

    rhel-binary-dvd.iso 替换为您的 ISO 镜像的名称。

  7. Create directories for Red Hat Enterprise Linux 8 AppStream and BaseOS Kickstart repositories:

    # mkdir --parents /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart
    # mkdir --parents /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart
  8. 从 ISO 镜像复制 kickstart 文件:

    # cp -a /mnt/iso/AppStream/* /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart
    # cp -a /mnt/iso/BaseOS/* /mnt/iso/images/ /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart

    请注意,对于 BaseOS,还必须复制 /mnt/iso/images/ 目录的内容。

  9. 在列出文件中添加以下条目:

    /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/listing 文件,使用新行附加 kickstart

    /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/listing 文件,使用新行附加 kickstart

    /var/www/html/pub/satellite-import/content/dist/rhel8/listing 文件,请使用新行附加版本号。例如,对于 Red Hat Enterprise Linux 8.1 二进制 ISO,请附加 8.1

  10. 从 ISO 镜像复制 .treeinfo 文件:

    # cp /mnt/iso/.treeinfo /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo
    # cp /mnt/iso/.treeinfo /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo
  11. 打开 /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo 文件进行编辑。
  12. [general] 部分进行以下更改:

    • packagedir = AppStream/Packages 改为 packagedir = Packages
    • repository = AppStream 更改为 repository = .
    • 变体 = AppStream 更改为 变体 = BaseOS
    • 变体 = AppStream,BaseOS 改为 variants = BaseOS
  13. [tree] 部分中,将 变体 = AppStream,BaseOS 更改为 variants = BaseOS
  14. [variant-BaseOS] 部分,进行以下更改:

    • 软件包 = BaseOS/Packages to packages = Packages
    • repository = BaseOS 更改为 repository =。
  15. 删除 [media][variant-AppStream] 部分。
  16. 保存并关闭该文件。
  17. 验证 /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo 文件具有以下格式:

    [checksums]
    images/efiboot.img = sha256:c01c18acc6778d6e66c8d0872bac59bfd7219ccf3cfa70a5c605c0fb37f33a83
    images/install.img = sha256:ddd08e5a5d92edee150f91ff4f12f39253eae72ff496465cf1b2766fe4a4df49
    images/pxeboot/initrd.img = sha256:a09a8ec89d485d71ed1bdad83584d6d816e67448221172d9aad97886cd70adca
    images/pxeboot/vmlinuz = sha256:6e523d7c3266e26c695923ab12b2873b16b0c61fb2e48ade608ad8998821584b
    
    [general]
    ; WARNING.0 = This section provides compatibility with pre-productmd treeinfos.
    ; WARNING.1 = Read productmd documentation for details about new format.
    arch = x86_64
    family = Red Hat Enterprise Linux
    name = Red Hat Enterprise Linux 8.1.0
    packagedir = Packages
    platforms = x86_64,xen
    repository = .
    timestamp = 1571146127
    variant = BaseOS
    variants = BaseOS
    version = 8.1.0
    
    [header]
    type = productmd.treeinfo
    version = 1.2
    
    [images-x86_64]
    efiboot.img = images/efiboot.img
    initrd = images/pxeboot/initrd.img
    kernel = images/pxeboot/vmlinuz
    
    [images-xen]
    initrd = images/pxeboot/initrd.img
    kernel = images/pxeboot/vmlinuz
    
    [release]
    name = Red Hat Enterprise Linux
    short = RHEL
    version = 8.1.0
    
    [stage2]
    mainimage = images/install.img
    
    [tree]
    arch = x86_64
    build_timestamp = 1571146127
    platforms = x86_64,xen
    variants = BaseOS
    
    [variant-BaseOS]
    id = BaseOS
    name = BaseOS
    packages = Packages
    repository = .
    type = variant
    uid = BaseOS
  18. 打开 /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo 文件进行编辑。
  19. [general] 部分进行以下更改:

    • packagedir = AppStream/Packages 改为 packagedir = Packages
    • repository = AppStream 更改为 repository = .
    • 变体 = AppStream,BaseOS 改为 variants = AppStream
  20. [tree] 部分中,将 变体 = AppStream,BaseOS 改为 variants = AppStream
  21. [variant-AppStream] 部分进行以下更改:

    • 更改 软件包 = AppStream/Packages to packages = Packages
    • repository = AppStream 更改为 repository = .
  22. 从文件中删除以下部分: [checksums], [images-x86_64], [images-xen], [media], [stage2], [variant-BaseOS].
  23. 保存并关闭该文件。
  24. 验证 /var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo 文件具有以下格式:

    [general]
    ; WARNING.0 = This section provides compatibility with pre-productmd treeinfos.
    ; WARNING.1 = Read productmd documentation for details about new format.
    arch = x86_64
    family = Red Hat Enterprise Linux
    name = Red Hat Enterprise Linux 8.1.0
    packagedir = Packages
    platforms = x86_64,xen
    repository = .
    timestamp = 1571146127
    variant = AppStream
    variants = AppStream
    version = 8.1.0
    
    [header]
    type = productmd.treeinfo
    version = 1.2
    
    [release]
    name = Red Hat Enterprise Linux
    short = RHEL
    version = 8.1.0
    
    [tree]
    arch = x86_64
    build_timestamp = 1571146127
    platforms = x86_64,xen
    variants = AppStream
    
    [variant-AppStream]
    id = AppStream
    name = AppStream
    packages = Packages
    repository = .
    type = variant
    uid = AppStream
  25. 如果您没有计划使用挂载的二进制 DVD ISO 镜像,请卸载并删除目录:

    # umount /mnt/iso
    # rmdir /mnt/iso
  26. 在卫星 Web UI 中,启用 Kickstart 存储库。
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.