yum -y install tftp-server syslinux tcp_wrappers-devel # tftp不能独立启动需要安装xinetd# 修改xinetd服务 vim /etc/xinetd.d/tftp dilable = no
# 重启xinetd,tftp服务
systemctl restart xinetd
systemctl enable xinetd
systemctl status xinetd
systemctl restart tftp
systemctl enable tftp
systemctl status tftp
从镜像文件拷贝以下文件并设置777权限
cd /var/lib/tftpboot
boot.msg initrd.img pxelinux.0 vesamenu.c32 vmlinuz
mkdir pxelinux.cfg
创建default文件
[root@pxe-zhuangji pxelinux.cfg]# cat default
default vesamenu.c32
timeout60
display boot.msg
menu clear
menu background splash.png
menu title Red Hat Enterprise Linux 7.2
menu vshift 8
menu rows 18
menu margin 8
menu helpmsgrow 15
menu tabmsgrow 13
menu color border * #00000000 #00000000 none
menu color sel 0#ffffffff #00000000 none
menu color title 0#ff7ba3d0 #00000000 none
menu color tabmsg 0#ff3a6496 #00000000 none
menu color unsel 0#84b8ffff #00000000 none
menu color hotsel 0#84b8ffff #00000000 none
menu color hotkey 0#ffffffff #00000000 none
menu color help0#ffffffff #00000000 none
menu color scrollbar 0#ffffffff #ff355594 none
menu color timeout0#ffffffff #00000000 none
menu color timeout_msg 0#ffffffff #00000000 none
menu color cmdmark 0#84b8ffff #00000000 none
menu color cmdline 0#ffffffff #00000000 none
menu tabmsg Press Tab for full configuration options on menu items.
menu separator # insert an empty line
menu separator # insert an empty line
label linux
menu label ^Install Red Hat PXE 7.2
menu default
kernel vmlinuz
append initrd=initrd.img inst.ks=ftp://192.168.1.11/redhat7.2/ks.cfg quiet
拷贝ks.cfg文件到指定位置