在网站找的资料,好不容易搭完了。。保存一下,防止以后忘记。。
相关软件包
dhcp-4.1.1-25.P1.el6.x86_64
dhcp-common-4.1.1-25.P1.el6.x86_64
tftp-server-0.49-7.el6.x86_64
syslinux-4.02-4.el6.x86_64
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /var/ftp/pub/centos/images/pxeboot/initrd.img /var/lib/tftpboot/centos64/
cp /var/ftp/pub/centos/images/pxeboot/vmlinuz /var/lib/tftpboot/centos64/
cp /var/ftp/pub/centos/images/vesamenu.c32 /var/lib/tftpboot/
cp /var/ftp/pub/centos/images/vesainfo.c32 /var/lib/tftpboot/
mkdir /var/lib/tftpboot/pxeconfig.cfg
-----------------DHCP-----------------------------
/etc/dhcp/dhcpd.conf
option domain-name "server.dyq.com";
option domain-name-servers 192.168.121.1;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
next-server 192.168.121.1;
subnet 192.168.121.0 netmask 255.255.255.0 {
range 192.168.121.10 192.168.121.100;
option domain-name-servers 192.168.121.1;
option domain-name "server.dyq.com";
option routers 192.168.121.254;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
filename "/pxelinux.0";
}
-----------------------------TFTP------------------------
/etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -u nobody -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
--------------------------PXE--------------------------------
/var/lib/tftpboot/pxelinux.cfg/default
default vesamenu.c32
#prompt 1
timeout 600
display boot.msg
menu title Welcome to DYQ.COM
label CentOS64
menu label ^CentOS 64
menu default
kernel centos64/vmlinuz
append initrd=centos64/initrd.img
阅读(5710) | 评论(0) | 转发(0) |