1.配置启动DHCP服务
#cp cp /usr/share/doc/dhcp-3.0.1 /dhcpd.conf.sample /etc/dhcpd.conf#vi /etc/dhcpd.conf 添加filename "pxelinux.0"; //指定bootloader文件
next-server 192.168.0.20; //指定索取pxelinux.0的tftp服务器IP
添加的这两行可在大括号外面,也可在里面,next-server选项可不写,但建议最好写上配置举例:
ddns-update-style interim;ignore client-updates; subnet 192.168.0.0 netmask 255.255.255.0 { option routers 192.168.0.1; option subnet-mask 255.255.255.0;option time-offset -18000; # Eastern Standard Time range dynamic-bootp 192.168.0.128 192.168.0.254; default-lease-time 21600; max-lease-time 43200; filename "pxelinux.0"; next-server 192.168.0.209; }
#cd /tftpboot
#cp /media/CentOS_5.3_Final/isolinux/* ./ (实际需要的是vmlinuz,initrd.img , *.msg 这几个文件,但为了操作方便,我直接把isolinux目录下的文件全cp过来)
#mkdir pxelinux.cfg
#mv isolinux.cfg pxelinux.cfg/default (default配置文件的作用是告诉主机从哪里去加载操作系统内核)
#cp /usr/lib/syslinux/pxelinux.0 ./ (将启动加载文件拷到/tftpboot下)
|
# vi /etc/xinetd.d/tftp
……………………………………………………………………………………
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
………………………………………………………………………………………… |
#chkconfig tftp on
#service xinetd restart
修改第3行.
2 prompt 1
3 timeout 10 //时间调小点
4 display g

















