3.5. 配置网络服务
某些调配方法使用胶囊服务器服务。例如,网络可能需要胶囊服务器来充当 DHCP 服务器。网络也可以使用 PXE 引导服务在新主机上安装操作系统。这要求将胶囊服务器配置为使用主 PXE 引导服务:DHCP、DNS 和 TFTP。
使用 satellite-installer 命令及 选项来在卫星服务器上配置这些服务。
要在外部胶囊服务器上配置这些服务,请运行 satellite-installer --scenario Capsule。
卫星服务器使用 eth0 进行外部通信,如连接到红帽的 CDN。
流程
要在 Satellite 集成胶囊上配置网络服务,请完成以下步骤:
输入
satellite-installer命令来配置所需的网络服务:# satellite-installer --foreman-proxy-dhcp true \ --foreman-proxy-dhcp-managed true \ --foreman-proxy-dhcp-gateway "192.168.140.1" \ --foreman-proxy-dhcp-interface "eth1" \ --foreman-proxy-dhcp-nameservers "192.168.140.2" \ --foreman-proxy-dhcp-range "192.168.140.10 192.168.140.110" \ --foreman-proxy-dhcp-server "192.168.140.2" \ --foreman-proxy-dns true \ --foreman-proxy-dns-managed true \ --foreman-proxy-dns-forwarders "8.8.8.8; 8.8.4.4" \ --foreman-proxy-dns-interface "eth1" \ --foreman-proxy-dns-reverse "140.168.192.in-addr.arpa" \ --foreman-proxy-dns-server "127.0.0.1" \ --foreman-proxy-dns-zone "example.com" \ --foreman-proxy-tftp true \ --foreman-proxy-tftp-managed true找到您配置的胶囊服务器:
# hammer proxy list刷新胶囊服务器的功能以查看更改:
# hammer proxy refresh-features --name "satellite.example.com"验证胶囊服务器上配置的服务:
# hammer proxy info --name "satellite.example.com"
3.5.1. 通过安装程序进行多个子网或域 复制链接链接已复制到粘贴板!
satellite-installer 选项只允许单个 DHCP 子网或 DNS 域。定义多个子网的一种方法是使用自定义配置文件。
对于每个额外子网或域,在 /etc/foreman-installer/custom-hiera.yaml 文件中创建一个条目:
dhcp::pools:
isolated.lan:
network: 192.168.99.0
mask: 255.255.255.0
gateway: 192.168.99.1
range: 192.168.99.5 192.168.99.49
dns::zones:
# creates @ SOA $::fqdn root.example.com.
# creates $::fqdn A $::ipaddress
example.com: {}
# creates @ SOA test.example.net. hostmaster.example.com.
# creates test.example.net A 192.0.2.100
example.net:
soa: test.example.net
soaip: 192.0.2.100
contact: hostmaster.example.com.
# creates @ SOA $::fqdn root.example.org.
# does NOT create an A record
example.org:
reverse: true
# creates @ SOA $::fqdn hostmaster.example.com.
2.0.192.in-addr.arpa:
reverse: true
contact: hostmaster.example.com.
执行 satellite-installer 来执行更改,并验证 /etc/dhcp/dhcpd.conf 是否包含相应的条目。然后,必须在卫星数据库中定义子网。