cobbler批量部署支持手动吗?Cobbler是否比kickstart好用一些
cobbler批量部署支持手动吗?Cobbler是否比kickstart好用一些2 : For PXE to be functional the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1 and should match the IP of the boot server on the PXE network.1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable b
对比Kickstart复杂配置Cobbler能做到什么?Welcome to Cobbler!
Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so you do not have to hop between many various commands and applications when deploying new systems and in some cases changing existing ones. Cobbler can help with provisioning managing DNS and DHCP package updates power management configuration management orchestration and much more.
总体的意思是说我可以帮助提供、管理DNS和DHCP、包更新、电源管理、配置管理编排等等,看起来很强大于是就试试。
思路- 1,ks 文件
- 2,Cobbler托管DHCP服务器
- 3,TFTP服务器
- 4,Http服务器
- 5,Cobbler导入镜像
- 6,从网络启动安装系统
1,安装前需要安装yum源
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2,安装必要服务
[root@localhost ~]# yum install cobbler cobbler-web dhcp xinetd tftp-server pykickstart httpd -y
3,配置DHCP
[root@localhost ~]# vim /etc/dhcp/dhcpd.conf [root@localhost ~]# cd /usr/share/doc/dhcp-4.2.5/ [root@localhost dhcp-4.2.5]# cp dhcpd.conf.example /etc/dhcp/dhcpd.conf cp: overwrite ‘/etc/dhcp/dhcpd.conf’? yes [root@localhost dhcp-4.2.5]# vim /etc/dhcp/dhcpd.conf subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.220 192.168.0.230; option subnet-mask 255.255.255.0; next-server 192.168.0.30; filename "pxelinux.0"; } 启动必要服务
[root@localhost ~]# systemctl start httpd [root@localhost ~]# systemctl enable httpd [root@localhost ~]# systemctl start cobblerd [root@localhost ~]# systemctl enable cobblerd [root@localhost ~]# systemctl status cobberd [root@localhost ~]# systemctl restart httpd [root@localhost ~]#systemctl start xinetd [root@localhost ~]#systemctl enable xinetd 启动Cobbler并排查问题
[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1 and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : Some network boot-loaders are missing from /var/lib/cobbler/loaders you may run 'cobbler get-loaders' to download them or if you only want to handle x86/x86_64 netbooting you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory should you want to support all architectures should include pxelinux.0 menu.c32 elilo.efi and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed it will be required to manage debian deployments and repositories
7 : 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
8 : 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.
解决问题修改/etc/cobbler/settings可以解决第一和第二步
[root@localhost ~]# vim /etc/cobbler/settings
修改内容如下:
101 default_password_crypted: "$1$Pa55w.rd$kLcAYzCCb/3wjad9QI17l0"
242 manage_dhcp: 1
[root@localhost cobbler]# cobbler profile report
[root@localhost ~]# cobbler profile edit --name=CentOS-7.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7.5-x86_64.cfg
该内核参数
[root@localhost ~]# cobbler profile edit --name=CentOS-7.5-x86_64 --kopts='net.ifnames=0 biost.ifnames=0 biosdevname=0
[root@localhost cobbler]# cobbler sync
开启另外一台虚拟机准备开始网络安装准备虚拟机经过如下图:
1,安装cobbler 将文件CentOS-7.5-x86_64.cfg上传至/var/lib/cobbler/kickstarts目录下。
2,DHCP配置后还需要在Cobbler来配置托管DHCP服务。
3,Cobbler导入镜像时文件名不能有空格,如:CentOS 7-5,这样是不可以的,可以是CentOS-7.5-x86_64.cfg。
4,CentOS-7.5-x86_64.cfg可以参考anaconda-ks.cfg ,如果你不想该该这个文件,你可以关注我,然后私信我“CentOS-7.5-x86_64.cfg”,我会把这个文件发给各位。
5,最后欢迎您的留言评论,谢谢!