B.2. 为 Red Hat Enterprise Linux 8 导入 Kickstart 存储库
使用这个流程为 Red Hat Enterprise Linux 8 导入 Kickstart 软件仓库。
流程
- 访问 access.redhat.com/downloads 并登录红帽客户门户网站。
- 点击 Red Hat Enterprise Linux。
- 从列表中选择一个产品变体和产品版本。例如,产品变体 Red Hat Enterprise Linux for x86_64 和 product version 8.1。
- 找到完整安装镜像,例如 Red Hat Enterprise Linux 8.1 Binary DVD,并点 Download Now。
- 下载完成后,将 ISO 镜像复制到卫星服务器。
在卫星服务器上,创建一个挂载点,并在该位置临时挂载 ISO 镜像:
mkdir /mnt/iso mount -o loop rhel-binary-dvd.iso /mnt/iso
# mkdir /mnt/iso # mount -o loop rhel-binary-dvd.iso /mnt/iso
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将 rhel-binary-dvd.iso 替换为您的 ISO 镜像的名称。
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
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 从 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
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 请注意,对于 BaseOS,还必须复制
/mnt/iso/images/
目录的内容。在列出文件中添加以下条目:
到
/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
。从 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
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
打开
/var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo
文件进行编辑。 在
[general]
部分进行以下更改:-
将
packagedir = AppStream/Packages
改为packagedir = Packages
-
将
repository = AppStream
更改为repository = .
-
将
变体 = AppStream
更改为变体 = BaseOS
-
将
变体 = AppStream,BaseOS
改为variants = BaseOS
-
将
-
在
[tree]
部分中,将变体 = AppStream,BaseOS
更改为variants = BaseOS
。 在
[variant-BaseOS]
部分,进行以下更改:-
将
软件包 = BaseOS/Packages
topackages = Packages
-
将
repository = BaseOS
更改为repository =。
-
将
-
删除
[media]
和[variant-AppStream]
部分。 - 保存并关闭该文件。
验证
/var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/baseos/kickstart/treeinfo
文件具有以下格式:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
打开
/var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo
文件进行编辑。 在
[general]
部分进行以下更改:-
将
packagedir = AppStream/Packages
改为packagedir = Packages
-
将
repository = AppStream
更改为repository = .
-
将
变体 = AppStream,BaseOS
改为variants = AppStream
-
将
-
在
[tree]
部分中,将变体 = AppStream,BaseOS
改为variants = AppStream
在
[variant-AppStream]
部分进行以下更改:-
更改
软件包 = AppStream/Packages
topackages = Packages
-
将
repository = AppStream
更改为repository = .
-
更改
-
从文件中删除以下部分:
[checksums]
,[images-x86_64]
,[images-xen]
,[media]
,[stage2]
,[variant-BaseOS]
. - 保存并关闭该文件。
验证
/var/www/html/pub/satellite-import/content/dist/rhel8/8.1/x86_64/appstream/kickstart/treeinfo
文件具有以下格式:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果您没有计划使用挂载的二进制 DVD ISO 镜像,请卸载并删除目录:
umount /mnt/iso rmdir /mnt/iso
# umount /mnt/iso # rmdir /mnt/iso
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 在卫星 Web UI 中,启用 Kickstart 存储库。