KickStart是一种无人职守安装方式
PXE + kickstart + DHCP + TFTP
1、挂载光盘
mount /dev/sr0 /mnt/iso
cp -rf /mnt/iso/* /var/www/html #拷贝光盘里面的所有内容到apache根目录下,作为安装源
2、安装TFTP-server
yum install tftp-server -y
vim /etc/xinetd.d/tftp
server_args = -s /tftpboot
disable = no
3、配置tftpboot
mkdir /tftpboot
chmod -R 777 /tftpboot
cp /usr/share/syslinux/pxelinux.0 /tftpboot/
cp /mnt/iso/images/pxeboot/initrd.img /tftpboot/
cp /mnt/iso/images/pxeboot/vmlinuz /tftpboot/
cp /usr/share/syslinux/vesamenu.c32 /tftpboot
mkdir /tftpboot/pxelinux.cfg
cp /mnt/iso/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
vim default
timeout 5 #修改时间
label centos #添加label 去掉默认的所有label
kernel vmlinuz
append initrd=initrd.img ks=http://192.168.1.69/ks.cfg
4、安装DHCP server
yum install dhcp -y
vim /etc/dhcp/dhcpd.conf
option routers
option subnet-mask
range dynamic-bootp
5、安装Httpd
yum install httpd -y
6、安装kickstart
yum install system-config-kickstart
system-config-kickstart
用kickstart自己定制 ks.cfg保存在/var/www/html/下
chmod 777 ks.cfg
7、关闭防火墙和selinux
/etc/init.d/iptables stop
setenforce 0
8、启动服务 httpd xinetd dhcpd