1. 实施步骤
1.1.软件安装
1.2.配置修改
1.3.服务启动
1.4.系统安装
2. 软件安装
2.1.yum install tftp-server
2.2.yum install dhcp
3. 服务配置修改
3.1.配置
tftp服务
#vi /etc/xinet.d/tftp
-----------------------------------------------------------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -u nobody -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
-----------------------------------------------------------------------
3.2.配置
dhcp
#cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
#vim /etc/dhcpd.conf
-----------------------------------------------------------------------
ddns-update-style interim;
ignore client-updates;
subnet
192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.0.2;
option time-offset -18000; # Eastern Standard Time
#
option ntp-servers 192.168.1.1;
#
option netbios-name-servers 192.168.1.1;
# --- 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.0.10 192.168.0.29;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.0.2;
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;
}
}
-----------------------------------------------------------------------
配置项
|
说明
|
ddns-update-style interim;
|
/*dhcp支持的
dns动态更新方式*/
|
ignore client-updates;
|
/*忽略客户端
DNS动态更新*/
|
authoritative;
|
/*授权
*/
|
allow booting;
|
/*支持
PXE启动*/
|
allow bootp;
|
/*支持
boottp*/
|
subnet 192.168.0.0 netmask 255.255.255.0
|
/*作用域
*/
|
option routers
192.168.0.1;
|
网关的
IP地址
|
range dynamic-bootp 192.168.0.10 192.168.0.50;
|
分配给客户端的
IP地址范围
|
default-lease-time 21600;
|
/*租期,秒数
*/
|
max-lease-time 43200;
|
/*最大租期,秒数
*/
|
next-server 192.168.0.2;
|
/*TFTPServer的
IP*/
|
filename "/pxelinux.0";
|
/*Bootstrap文件
*/
|
3.3.配置
PXE
3.3.1. 创建目录
#mkdir /var/netoot
3.3.2. 复制文件
#mount /dev/cdrom /media
#cp –rf /mediar/* /var/netboot
//复制操作系统安装文件
#mkdir /tftpboot
#cp /var/netboot/isolinux/* /tftpboot
#mkdir /tftpboot/pxelinux.cfg
#mv /tftpboot/isolinux.cfg /tftpboot/pxelinux.cfg/default
3.4.配置
NFS服务
#vi /etc/exports
--------------------------------------------------------------------
/var/netboot
*(ro,sync)
/tftpboot
*(ro,sync)
--------------------------------------------------------------------
#exportfs –a
//导出共享目录
4. 服务启动
#service nfs start
#service dhcpd start
#service xinetd start
#chkconfig –level 345 xinetd on
#chkconfig –level 345 tftp on
5. 系统安装
5.1.设置计算机从
PXE启动
5.2.安装系统