设置dhcp服务器
[root@localhost windows]# vim /etc/dhcp/dhcpd.conf
设置:
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
subnet 192.168.40.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.40.200 192.168.40.250;
option broadcast-address 192.168.40.255;
option routers 192.168.40.1;
option subnet-mask 255.255.255.0;
next-server 192.168.40.254;
filename "pxelinux.0";
}
从上而下解释:
设置dhcp服务器网段和子网掩码,再设置ip地址动态范围,设置广播地址,设置路由地址,设置子网掩码,设置tftp服务器地址,最后设置下bootlocader文件名
启动dhcp服务并纳入开机自启
[root@localhost windows]# systemctl enable dhcp && systemctl start dhcp
- 服务端1搭建tftp服务器
[root@localhost windows]# yum –y install tftp
设置tftp服务器(简单文本传输)
[root@localhost windows]# vim /etc/xinetd.d/tftp
设置:
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = yes
per_source = 11
cps = 100 2
flags = IPv4
}
将disable=yes改为disable=no 意思是启用tftp启动tftp服务并纳入开机自启
[root@localhost windows]# systemctl enable xinetd && systemctl start xinetd
查询tftp状态:
[root@localhost windows]# netstat -a| grep tftpudp6 0 0 [::]:tftp [::]:* [::]:*
- 服务端1安装syslinux服务(pxe)
[root@localhost windows]# yum -y install syslinux
将pxelinux0、memdisk、menu.c32复制到tftp默认共享目录
[root@localhost windows]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/[root@localhost windows]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/[root@localhost windows]# cp /usr/share/syslinux/memdisk /var/lib/tftpboot/创建默认的pxe启动配置菜单,winpe_amd64.iso是windows7_x64的pe镜像
[root@localhost windows]# mkdir /var/lib/tftpboot/pxelinux.cfg[root@localhost windows]# vim /var/lib/tftpboot/pxelinux.cfg/defaultUI menu.c32
经验总结扩展阅读
- 明日之后8月12日海洋版本更新开服时间说明-明日之后海洋版本进不去怎么办
- dnf浓缩的纯洁之骸怎么得100版本(dnf100版本浓缩异界精髓怎么获得)
- 鸿蒙2.0.0.136是什么版本_鸿蒙2.0.0.136更新内容
- clang在编译时指定目标文件所需的最低macOS版本
- 原神3.0版本能获得多少原石
- 原神3.0版本up卡池角色如何取舍
- 《炉石传说》现版本用战士打巫妖王怎么打(炉石巫妖王全职业攻略)
- 幻塔2.2版本上线时间是什么时候
- 幻塔2.2镜花水月版本直播兑换码兑换码是什么
- 笔记本电脑CF中烟雾头怎么调(win10cf新版本烟雾保护头怎么调)