option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.170;
# option netbios-name-servers 192.168.1.170;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.128 192.168.1.254;
default-lease-time 21600;
max-lease-time 43200;
filename "/pxelinux.0";
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
保存并且退出,其中NTP服务器、NIS服务器、以及NETBIOS服务器并不是必须,但是一定要注意后面手动添加的一行:filename "/pxelinux.0";
完成之后启动服务:
# service dhcpd restart
在客户端启动之后通过查看文件/var/lib/dhcp/dhcpd.leases可以得知客户端是否正常获得IP地址
3.配置TFTP服务:
这种安装的原理是客户端启动之后通过TFTP服务器获得配置文件信息和安装信息,因此需要开启TFTP服务。
# vi /etc/xi net.d/tftp 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 {
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
之后重启TFTP服务:/etc/rc.d/init.d/xinetd restart或者干脆chkconfig tftp on即可
4.配置NFS服务:
# vi /etc/exports
添加安装树的路径:
/installing/var/ftp/pub 192.1681.0/24(ro,async)
保存退出
# service portmap restart
# service nfs restart
# exportfs –rv
# showmount –e
# chkconfig nfs on
出现下面内容即可:
/installing/var/ftp/pub 192.168.1.0/24
5.配置支持PXE启动:
# mkdir /tftp ————>若该文件夹已经存在则不用建立
# cp /usr/lib/syslinux/pxelinux.0 /tftpboot
把Linux第一张安装光盘上/image/pxeboot/initrd.img和vmlinux 以及isolinux/*.msg拷贝到/tftpboot目录下
# cd /tftpboot
# mkdir pxelinux.cfg
# cd pxelinux.cfg
# vi default
配置文件default文件的内容如下: