Cobbler自动批量部署不同需求的系统

本文介绍了如何利用Cobbler进行批量系统部署,包括Cobbler的安装和配置、DHCP的设置、kickstart自动应答脚本的生成、镜像导入、虚拟机创建以及Redhat系统的密码重置方法,详细阐述了每个步骤的关键操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

cobbler简介

这里写图片描述
这里写图片描述

看到百度这句话的时候我心里突然觉得压力好大啊啊啊,感觉饭碗不保,赶紧学习了一下

曾经使用PXE批量安装系统,但是PXE存在一个缺陷,即只能安装单一的操作系统。但是在实际环境中,不同功能的服务器需要部署不同的环境,而cobbler正好满足了这一需求。cobbler基于python开发,是对PXE的二次封装,且提供了CLI和Web的管理形式,使得操作和管理更加简便。cobbler的实现与PXE类似,也需要tftp,httpd,dhcp这些服务。使用yum即可完成cobbler的安装,在安装的同时也会自动安装tftp和httpd服务,dhcp服务需要自行安装。

准备工作:

Cobbler实验主机环境:

OS: Redhat 7.2 x86_64bit
IP: 192.168.1.4

防火墙关闭,SELinux处于disabled状态
这里写图片描述

为了安装Cobbler所需要的一系列软件,首先配置一下yum源,贴上本人的

#自己挂的镜像
[lockey]
name=lockey rhel72
baseurl=http://192.168.1.4/iso72
gpcheck=0

#epel网络源
[good]
name=ailiyun
baseurl=http://mirrors.aliyun.com/epel/7/x86_64/
enabled=1
gpgcheck=0

#网络yum源
[centos]
name=cobbler
baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0

1. cobbler安装和基本配置

[root@lockey4 ~]# yum install cobbler cobbler-web pykickstart debmirror 

这里写图片描述

这里也有一个el7的RPM包可以用也可以不用cobbler-2.8.1-2.el7.x86_64.rpm

启动cobbler

[root@lockey4 ~]#  systemctl start cobblerd.service

[root@lockey4 ~]# cobbler check
这里写图片描述

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.  F
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值