一、实验环境
一台红帽7.9的机子,配置网络可用,安装httpd tftp等所需软件,确保火墙selinux都关闭
二、配置PXE服务端
1.开启RHEL7的机子,确保有图形界面
# 下载图形界面
yum group install "Server with GU!"
# 切换到图形界面
init 5
2.安装和部署 kickstart 无人看守安装
#安装kickstart
yum install system-config-kickstart -y
# 启动图形制作工具
system-config-kickstart
3、安装httpd将文件共享出去
#下载httpd
yum install httpd -y
#将文件复制到默认发布目录
cp /root/ks.cfg /varwww/html!
In -s /rhel7/ /var/wwwhtml4、安装dhcp服务器
# 安装dhcp服务器
yum install dhcp -y
# 生成配置文件
icp -f/usrshare/docdhcp*/dhcpd conf.example /etc/dhcp/dhcpd.conf
# 编辑配置文件
vim /etc/dhcp/dhcpd.conf
#先删除37行之后的内容
5、安装配置syslinux和tftp
# 安装所需软件
yum install syslinux.x86 64 -
yum install tftp-server.x86 64 -y
# 启动tftp来共享pxelinux.0数据文件
systemctl enable --now tftp
#将所需资源导入/var/lib/tftpboot/
cp /rhel7/isolinux/* /var/lib/tftpboot!
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot!
#查看/var/lib/tftpboot/
cd /var/lib/tftpboot/
[root@node1 tftpboot]# ls
boot.cat grub.conf isolinux.bin memtestsplash.png upgrade.img vmlinuz
boot.msg initrd.img isolinux.cfg pxelinux.0 TRANS.TBL vesamenu.c32
#进入dhcp配置文件添加
vim /etc/dhcp/dhcpd.cof
3、客户端测试