此时查看 /var/lib/cobbler/loaders 目录下,会发现,已经下载了很多的内容。然后重启和同步服务,并运行 cobbler check 查看还剩下一些什么问题,我们接着一个个去解决。
#这个目录下最关键的文件就是 menu.c32 pxelinux.0 [root@localhost ~]#ls /var/lib/cobbler/loaders COPYING.elilo COPYING.yaboot grub-x86_64.efi menu.c32 README COPYING.syslinux elilo-ia64.efi grub-x86.efi pxelinux.0 yaboot [root@localhost ~]#cobbler check The following are potential configuration items that you may want to fix: 1 : enable and start rsyncd.service with systemctl 2 : debmirror package is not installed, it will be required to manage debian deployments and repositories 3 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one 4 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them Restart cobblerd and then run 'cobbler sync' to apply changes.接下来,我来看剩下的问题。前两个问题不是很重要,我们先忽略过去。来看第三个问题,这个问题是说,应该为每一个新安装的主机设置一个默认的用户口令。并且信息中提示了使用
openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'
命令来生成加密的用户口令。 如果不设置,默认的用户口令就是cobbler。
#生成密码是123456 的用户口令 [root@localhost ~] openssl passwd -1 123456$1$wuX5VyFf$a0Y/HdzHRCbVWhSFnbV8n/然后将生成的口令替换到/etc/cobbler/settings中default_password_crypted字段中。
重新启用并同步服务,然后看看还有什么问题。
[root@localhost ~]#cobbler check The following are potential configuration items that you may want to fix: 1 : enable and start rsyncd.service with systemctl 2 : debmirror package is not installed, it will be required to manage debian deployments and repositories 3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them Restart cobblerd and then run 'cobbler sync' to apply changes.fencing tools 是在集群环境中才会使用到的工具,我们暂且先不用管。这样一来,关于Cobbler的check 工作我们就完成了。
通过Cobbler 管理DHCP我们利用DHCP的cobbler 功能来自动管理DHCP,修改 /etc/cobbler/settings 配置文件中的manage_dhcp字段。 设置为1,则由Cobbler 来管理DHCP
修改Cobbler下 /etc/cobbler/dhcp.template 模板文件/etc/cobbler/dhcp.template 这个文件是配置DHCP的内容的。但是这个文件是Cobbler来提供的。也就是说,配置好了这个文件,重新启动Cobbler 服务,Cobbler就会自动地替我们管理DHCP。
# 在/etc/cobbler/dhcp.template 找到下面地这段内容进行修改整理。 # 按照自己地要求进行DHCP地配置。 subnet 172.18.2.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; range dynamic-bootp 172.18.2.100 172.18.2.254; default-lease-time 21600; max-lease-time 43200; next-server $next_server; class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; if option pxe-system-type = 00:02 { filename "ia64/elilo.efi"; } else if option pxe-system-type = 00:06 { filename "grub/grub-x86.efi"; } else if option pxe-system-type = 00:07 { filename "grub/grub-x86_64.efi"; } else { filename "pxelinux.0"; } }}