安装dhcp server
yum -y install dhcp
cd /usr/share/doc/dhcp-4.2.5
cp dhcpd.conf.example /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 10.11.11.0 netmask 255.255.255.0{
range 10.11.11.26 10.11.11.255;
option routers 10.11.11.254;
default-lease-time 600;
max-liase-time 7200;
next-server 10.11.11.1;指定pxe引导服务器
filename "pxelinux.0"
}
systemctl start dhcpd
安装tftpserver与syslinux
yum -y install syslinux
yum -y install tftp-server
vim /etc/xinet.d/tftp
disable = no
systemctl start xinetd
cd /var/lib/tftpboot
cp /usr/share/syslinux/pxelinux.0 ./
cp /var/ftp/yum/isolinux/vmlinux ./
cp /var/ftp/yum/isolinux/initrd.img ./
cp /var/ftp/yum/isolinux/vesamenu.c32 ./
cp /var/ftp/yum/isolinux/boot.msg ./