使用PXE协议远程安装LINUX
OS:REDHATAS3.X
1、安装tftp和dhcp服务器
#rpm-ivhtftp-server-0.39-0.EL3.1.c0.i386.rpm
#rpm-ivhdhcp-3.0.1-10_EL3.i386.rpm
2、配置tftp和dhcp服务器
以下为引用的内容:
#vi/etc/xinetd.d/tftp
=============+==========+===========+============+============
servicetftp
{
disable=no
socket_type=dgram
protocol=udp
wait=yes
user=root
server=/usr/sbin/in.tftpd
server_args=-unobody-s/tftpboot
per_source=11
cps=1002
flags=IPv4
}
=============+==========+===========+============+============
#cp/usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample/etc/dhcpd.conf
#vi/etc/dhcpd.conf
=============+==========+===========+============+============
optiondomain-name"systeng.net";
default-lease-time6000;
max-lease-time11400;
authourtative;
ddns-update-stylead-hoc;
log-facilitylocal7;
subnet192.168.10.0netmask255.255.255.0{
range192.168.10.150192.168.10.155;
optiondomain-name-servers202.99.160.68;
optiondomain-name"systeng.net";
optionnetbios-name-servers192.168.10.1;
optionrouters192.168.10.1;
optionbroadcast-address192.168.10.255;
default-lease-time6000;
max-lease-time11400;
filename"/pxelinux.0";
}
=============+==========+===========+============+============
3、配置支持PXE
#mkdir/tftpboot
#cp/usr/lib/syslinux/pxelinux.0/tftpboot
把LINUX第一张安装光盘上/image/pxeboot/initr.img和vmlinux以及isolinux/*.msg考到/tftpboot目录下
以下为引用的内容:
#cd/tftpboot
#mkdirpxelinux.cfg
#videfault
=============+==========+===========+============+============
default
prompt1
timeout30
displayboot.msg
F1boot.msg
F2options.msg
F3general.msg
F4param.msg
F5rescue.msg
F7snake.msg
labellocal
localboot0
labellinux
kernelvmlinuz
appendinitrd=initrd.imgdevfs=nomountramdisk_size=9216
labeltext
kernelvmlinuz
appendinitrd=initrd.imgtextdevfs=nomountramdisk_size=9216
labelexpert
kernelvmlinuz
appendexpertinitrd=initrd.imgdevfs=nomountramdisk_size=9216
labelks
kernelvmlinuz
appendksinitrd=initrd.imgdevfs=nomountramdisk_size=9216
labelnofb
kernelvmlinuz
appendinitrd=initrd.imgdevfs=nomountnofbramdisk_size=9216
labellowres
kernelvmlinuz
appendinitrd=initrd.imglowresdevfs=nomountramdisk_size=9216
kernelvmlinuz
=============+==========+===========+============+============
4、配置NFS服务
#vi/etc/exports
/home/iso/192.168.10.0/24(ro,sync)
#mkdir/home/iso
拷贝安装LINUX的ISO文件到这个目录
5、需要开启的系统服务
/dhcpd/network/nfs/portmap/syslog/tftp/xinetd/
6、硬件需求
网卡上需要添加PXE远程启动芯片