pxe
[root@server34 ~]# yum install dhcp httpd tftp-server lftp -y ##安装需要的服务
[root@server34 ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
cp: overwrite ‘/etc/dhcp/dhcpd.conf’? y
[root@server34 ~]# vim /etc/dhcp/dhcpd.conf ##提供动态ip
[root@server34 ~]# systemctl start dhcpd
[root@server34 ~]# systemctl start httpd
[root@server34 ~]# systemctl enable httpd
[root@server34 ~]# vim /etc/xinetd.d/tftp
disable = no
[root@server34 ~]# systemctl restart xinetd.service
[kiosk@foundation6 rhel7]$ cd isolinux/
[kiosk@foundation6 isolinux]$ ls
boot.cat grub.conf isolinux.bin memtest TRANS.TBL vesamenu.c32
boot.msg initrd.img isolinux.cfg splash.png upgrade.img vmlinuz
[kiosk@foundation6 isolinux]$ scp * root@172.25.254.134:/var/lib/tftpboot/ ##复制需要的文件
root@172.25.254.134's password:
boot.cat 100% 2048 2.0KB/s 00:00
boot.msg 100% 84 0.1KB/s 00:00
grub.conf 100% 321 0.3KB/s 00:00
initrd.img 100% 38MB 37.9MB/s 00:01
isolinux.bin 100% 24KB 24.0KB/s 00:00
isolinux.cfg 100% 3166 3.1KB/s 00:00
memtest 100% 172KB 172.4KB/s 00:00
splash.png 100% 186 0.2KB/s 00:00
TRANS.TBL 100% 2438 2.4KB/s 00:00
upgrade.img 100% 43MB 43.1MB/s 00:01
vesamenu.c32 100% 150KB 149.5KB/s 00:00
vmlinuz 100% 5034KB 4.9MB/s 00:00
[root@server34 ~]# cd /var/lib/tftpboot/
[root@server34 tftpboot]# ls
boot.cat grub.conf isolinux.bin memtest TRANS.TBL vesamenu.c32
boot.msg initrd.img isolinux.cfg splash.png upgrade.img vmlinuz
[root@server34 tftpboot]# yum whatprovides */pxelinux.0 -y
[root@server34 tftpboot]# yum install syslinux.x86_64 -y
[root@server34 tftpboot]# file /usr/share/syslinux/pxelinux.0
/usr/share/syslinux/pxelinux.0: data
[root@server34 tftpboot]# vim /etc/dhcp/dhcpd.conf
subnet 172.25.254.0 netmask 255.255.255.0 {
range 172.25.254.80 172.25.254.90;
option routers 172.25.254.254;
next-server 172.25.254.134; ##服务器主机ip
filename "pxelinux.0"; ##启动读取文件
}
[root@server34 tftpboot]# systemctl restart dhcpd
[root@server34 tftpboot]# vim pxelinux.cfg/default
62 menu label testestest