要在CentOS上使用Cobbler添加新节点,可以按照以下步骤进行操作:
cobbler system add --name <新节点名称> \
--profile <发行版配置文件名称> \
--interface <网络接口> \
--mac <MAC地址> \
--ip <IP地址> \
--subnet <子网掩码> \
--gateway <网关> \
--static \
--hostname <主机名> \
--name-servers <DNS服务器地址> \
--kickstart <Kickstart文件路径>
例如:
cobbler system add --name linux-node2 \
--profile CentOS-7.0-x86_64 \
--interface eth0 \
--mac 00:50:56:3E:61:CF \
--ip 192.168.56.12 \
--subnet 255.255.255.0 \
--gateway 192.168.56.2 \
--static \
--hostname linux-node2.example.com \
--name-servers "192.168.56.2" \
--kickstart /var/lib/cobbler/kickstarts/CentOS-7.1-x86_64_cobbler.cfg
登录Cobbler Web界面。
导航到“Systems”选项卡。
点击“Add System”按钮。
填写新节点的相关信息,包括名称、配置文件、网络接口、MAC地址、IP地址、子网掩码、网关、主机名、DNS服务器地址和Kickstart文件路径。
点击“Add System”保存设置。
同步Cobbler配置:
在添加新节点后,需要同步Cobbler配置以使更改生效:
cobbler sync
确保DHCP和TFTP服务已经启动并运行:
systemctl restart cobblerd
systemctl enable cobblerd
systemctl restart tftp
systemctl enable tftp
完成以上步骤后,新节点应该已经成功添加到Cobbler中,并且可以通过PXE启动进行自动化安装。