1.3. 使用独立hammer
您可以在没有安装 Satellite 服务器的主机上安装 hammer,并使用它来将主机连接到远程 Satellite。
先决条件
- 确保您将主机注册到 Satellite 服务器或 Capsule 服务器。有关更多信息,请参阅 置备指南中的注册主机。https://access.redhat.com/documentation/zh-cn/red_hat_satellite/6.10/html/provisioning_guide/creating_cloud_images#Registering_Host
确保您在 Satellite 服务器或 Capsule 服务器上同步以下存储库:有关更多信息,请参阅 内容 管理指南中的 同步红帽存储库。
- rhel-7-server-rpms
- rhel-server-rhscl-7-rpms
- rhel-7-server-satellite-tools-6.10-rpms
流程
在主机上,完成以下步骤来安装 hammer :
启用 Red Hat Enterprise Linux、Red Hat Software Collections 和 Red Hat Satellite Tools 6.10 软件仓库:
subscription-manager repos --enable=rhel-7-server-rpms \ --enable=rhel-server-rhscl-7-rpms \ --enable=rhel-7-server-satellite-tools-6.10-rpms
# subscription-manager repos --enable=rhel-7-server-rpms \ --enable=rhel-server-rhscl-7-rpms \ --enable=rhel-7-server-satellite-tools-6.10-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 安装
hammer:yum install tfm-rubygem-hammer_cli_katello
# yum install tfm-rubygem-hammer_cli_katelloCopy to Clipboard Copied! Toggle word wrap Toggle overflow 编辑
/etc/hammer/cli.modules.d/foreman.yml文件中的:host:条目,使其包含 Satellite IP 地址或 FQDN。:host: 'https://satellite.example.com'
:host: 'https://satellite.example.com'Copy to Clipboard Copied! Toggle word wrap Toggle overflow