[[email protected] ~]# yum install dhcp tftp-server httpd syslinux-nonlinux
[[email protected] ~]# cd /var/www/html/;mkdir centos/6 ksdir -pv
[[email protected] html]# mount /dev/sr0 centos/6/
[[email protected] ksdir]# rz ks6.cfg //上传事先准备好的应答文件
[[email protected] ~]# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
[[email protected] ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ //# rpm -ql syslinux-nonlinux |grep pxelinux
[[email protected] ~]# mkdir /var/lib/tftpboot/pxelinux.cfg/
[[email protected] ~]# cd /mnt/cd1/isolinux/
[[email protected] isolinux]# cp isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
[[email protected] isolinux]# cp boot.msg initrd.img splash.jpg vesamenu.c32 vmlinuz /var/lib/tftpboot/
[[email protected] ~]# cd /var/lib/tftpboot/
[[email protected] tftpboot]# vi pxelinux.cfg/default
default vesamenu.c32
timeout 600
display boot.msg
menu background splash.jpg
menu title Auto install centos
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label linux
menu label ^Auto install an mini system
menu default
kernel vmlinuz
append initrd=initrd.img ks=http://192.168.93.6/ksdir/ks6.cfg
label vesa
menu label ^Manual install an system
kernel vmlinuz
append initrd=initrd.img repo=http://192.168.93.6/centos/6
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img rescue repo=http://192.168.93.6/centos/6
label local
menu label Boot from ^local drive
localboot 0xffff
vmware新开一台虚拟电脑 --> 使用网络启动,即可全程自动完成系统的安装
原文地址:http://blog.51cto.com/12555197/2178968