首先要有FTP和DHCP
mkdir -p /var/ftp/centos6
cp -rp /media/cdrom/* /var/ftp/
yum -y install tftp-server 安装TFTP
vim /etc/xinetd.d/tftp
/etc/init.d/xinetd start
chkconfig tftp on
cd /var/ftp/centos6/isolinux/
cp vmlinuz initrd.img /var/lib/tftpboot/
yum -y install syslinux
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /var/ftp/centos6/isolinux/isolinux.cfg /var/lib/tftpboot/
chmod 644 isolinux.cfg
vim isolinux.cfg
mkdir pxelinux.cfg
mv isolinux.cfg ./pxelinux.cfg/default
vim /etc/dhcp/dhcpd.conf
/etc/init.d/dhcpd start
就可以装机了
如果要现实无人看守的安装:
yum -y install system-config-kickstart
init 5
cd /root/
cp ks.cfg /var/ftp/
chmod 777 /var/ftp/ks.cfg
cat ks.cfg
vim /var/lib/tftpboot/pxelinux.cfg/default
然后就可以无人值守自动化装机了