需求场景
实验室有多台服务器在机柜里,如果一台一台装,会十分麻烦。给出解决方案。cobbler+pxe
网络环境
服务器由一台三层交换机管理,分2个vlan.
如有使用路由器,记得关闭路由器dhcp功能
地址段为,192.168.1.0/24和192.168.2.0/24
服务器有2张网卡,默认使用第一张。
在部署前需关闭交换机DHCP功能。
cobbler所需组件介绍
需部署的服务
cobbler (cobbler 的核心)
httpd (提供 cobbler 的 web 界面)
dhcpd (为自动安装系统分配 IP 地址)
epel-release(为之提供yum源)
rsync (cobbler 需要同步信息)
cobbler-web (cobbler 的一个 web 插件)
xinetd (为 rsync 和 tftp 的守护进程)
tftp (传送安装的一些文件的 类似ftp)
基本环境部署
1.关闭防火墙和 selinux
systemctl stop firewalld
systemctl disable firewalld
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
2.cobbler 安装
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install cobbler cobbler-web tftp-server dhcp httpd xinetd
3.加入开机自启并启动
systemctl enable httpd cobblerd
systemctl start httpd cobblerd
4.满足部署要求
输入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</

本文介绍如何使用Cobbler结合PXE技术实现实验室多台服务器的批量自动化部署CentOS7系统。从环境搭建到具体步骤详细说明,并提供了所需的组件介绍及配置过程。
最低0.47元/天 解锁文章
829

被折叠的 条评论
为什么被折叠?



