PXE自动装机
(1) 创建目录 mkdir -p /var/ftp/centos6
(2) cd /var/ftp/centos6
(3) cp -rp /media/cdrom/* .
(4) yum -y install tftp-srtver
(5) vim /etc/xinetd.d/tftp wait改成No disable 改成no
(6) /etc/init.d.d/xinetd start (启动服务)
(7) chkconfig tftp on(改成开机启动)
(8) cd /var/ftp/centos6/isolinux/
(9) vp vmlinuz initrd.img /var/lib/tftpboot
(10)yum -y install syslinux
(11)cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
(12)cp /var/ftp/centos6/isolinux/islinux.cfg /var/lib/tftpboot
(13)chmod 644 isolinux.cfg
(14)vim /var/lib/tftpboot/isolinux.cfg 修改文件 名字随便改 下面加一句话 prompt 0(不进行交互的意思) timeout 600注释掉
(15)注释掉menu那些数据
(16)label vesa改成text append后面加test 17行append后面加rescue
(17)cd /var/lib/tftpboot
(18)mkdir pxelinux.cfg
(19)mv isolinux.cfg pxelinux.cfg/default
(20)yum -y install dhcpd
(21)vim /etc/dhcp/dhcpd.conf (复制模板 第二句话)
(22)cp /usr/share/doc/dhcp*/dhcpd.conf.sample
(23)cat dfcpd.conf.sample > dhcpd.conf
(24) vim dhcpd.conf
(25)
(26)mv dhcpd.conf /etc/dhcp/
(27)/etc/init.d/dhcpd start
(28) yum -y install vsftpd
(29)/etc/init.d/vsftpd start
(30)关闭防火墙 service iptables stop
另起虚拟机
(1) yum -y install ftp
(2) ftp 主机的IP
(3) 在主机yum -y install system-config-kickstart
(4) Init 5
(5) yum groupinstall “Deskop”
(6) /etc/init.d/dhcpd restart (重启服务)
(7) /etc/init.d/xinetd restart(重启服务)
(8) /etc/init.d/vsftpd restart(重启服务)
(9) cp ks.cfg /var/ftp
chmod 777 /var/ftp/ks.cfg
(10) vim /var/lib/tftpboot/pxelinux.cfg/default
(11) 在9行后面写上ks.cfg
(12) Vim /var/ftp/ks.cnf 加上一句话(unsupported_hardware)就跳过卡顿了