昨天细说了一下PXE批量装机,今天给大家整理一下Cobbler批量装机。
步骤一:Cobbler装机准备
0 .简要:
1).Cobbler目前只支持CentOS平台,所以,要想Cobbler批量装机,先要准备一台CentOS机器
2).假设为192.168.4.0网段
1. 搭建CentOS物理机
3. 导入Cobbler.zip软件包[Cobbler装机所需要的依赖包,提前下载好]
步骤二、搭建Cobbler装机平台
Cobbler概述软件:管理dhcp、tftp、Web服务,并且自由的导入镜像与ks应答文件
1.解压Cobbler.zip包
[root@cobbler /]# unzip /root/Cobbler.zip -d /
[root@cobbler /]# cd /Cobbler/
[root@cobbler Cobbler]# cd cobbler
2.装cobbler主程序、工具包等
[root@cobbler /]# yum -y install /Cobbler/cobbler/*.rpm
注意:安装rpm包时有时候不成功,则再重新安装一遍
安装的软件 cobbler cobbler-web dhcp tftp-server pykickstart httpd
3.cobbler网络装机部署
配置cobbler
[root@cobbler /]# vim /etc/cobbler/settings
6.启动相关服务
[root@cobbler /]# systemctl restart cobblerd httpd tftp rsyncd
[root@cobbler /]# systemctl enable cobblerd httpd tftp rsyncd
7.同步刷新cobbler配置
[root@cobbler /]# cobbler sync
[root@cobbler /]# firefox https://192.168.4.180/cobbler_web
8.导入安装镜像数据
双系统1:
注意:安装Centos时运行内存至少要2G以上
双系统2:
可以再导入其它系统
cobbler导入的镜像放在:/var/www/cobbler/ks_mirror
[root@cobbler ~]# cobbler list
修改kickstart文件:
[root@cobbler ~]# system-config-kickstart #生成ks文件
默认kickstart文件存放位置:/var/lib/cobbler/kickstarts/
[root@cobbler ~]# cobbler profile edit --name=CentOS7.4-A --kickstart=/var/lib/cobbler/kickstarts/自定义ks文件.cfg
[root@cobbler ~]# cobbler profile report
[root@cobbler ~]# cobbler sync
步骤三、开始装机
装机centos时,用户名为root,密码为cobbler[默认],运行内存要大于2G
文章来源: 云计算之Cobbler批量装机