[root@localhost ~]#yum install tftp-server vsftpd syslinux dhcp -y
[root@localhost ~]#cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
cp:是否覆盖"/etc/dhcp/dhcpd.conf"? y
[root@localhost ~]#
[root@localhost ~]#vim /etc/dhcp/dhcpd.conf
[root@localhost ~]#systemctl start dhcpd
[root@localhost ~]#vim /etc/xinetd.d/tftp
[root@localhost ~]#cd /var/lib/tftpboot/
[root@localhost tftpboot]#ls
[root@localhost tftpboot]#mount /dev/sr0 /mnt/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost tftpboot]#cp /mnt/isolinux/initrd.img .
[root@localhost tftpboot]#ls
initrd.img
[root@localhost tftpboot]# cp /mnt/isolinux/vmlinuz .
[root@localhost tftpboot]#ls
initrd.img vmlinuz
[root@localhost tftpboot]#cp /usr/share/syslinux/pxelinux.0 .
[root@localhost tftpboot]#ls
initrd.img pxelinux.0 vmlinuz
[root@localhost tftpboot]#mkdir pxelinux.cfg
[root@localhost tftpboot]#ls
initrd.img pxelinux.0 pxelinux.cfg vmlinuz
[root@localhost tftpboot]#
[root@localhost tftpboot]#vim pxelinux.cfg/default
[root@localhost tftpboot]#mkdir /var/ftp/centos7
[root@localhost tftpboot]#mount /dev/sr0 /var/ftp/centos7/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost tftpboot]#systemctl start tftp.socket
[root@localhost tftpboot]#systemctl start vsftpd
[root@localhost tftpboot]#yum install system-config-kickstart.noarch -y
[root@localhost tftpboot]#vim ./pxelinux.cfg/default
pxe自动安装系统