服务器无人值守安装(pxe+kickstart)

#!/bin/bash

# rhel6.1 platform
# Pxe+Kickstart Server configuration

yum -y install httpd tftp-server dhcp syslinux xinetd

#  cp /mnt/hgfs/share/CentOS-6.0-x86_64-ks.cfg /var/www/html/ks.cfg
#  mkdir -p /var/www/html/pub
#  mount -o loop /mnt/hgfs/share/CentOS-6.0-x86_64-bin-DVD.iso /var/www/html/pub
#  vim /etc/xinetd.d/tftp 
#       disable                 = no
#  cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
#  cp /var/www/html/pub/images/pxeboot/initrd.img /var/lib/tftpboot
#  cp /var/www/html/pub/images/pxeboot/vmlinuz /var/lib/tftpboot
#  cp /var/www/html/pub/isolinux/*.msg /var/lib/tftpboot
#  cp /var/www/html/pub/isolinux/vesamenu.c32 /var/lib/tftpboot
#  mkdir -p /var/lib/tftpboot/pxelinux.cfg
#  cp /var/www/html/pub/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
#  cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
#  vim /etc/dhcp/dhcpd.conf
#       next-server 10.1.15.30;
#       filename "/pxelinux.0";
#  vim /var/lib/tftpboot/pxelinux.cfg/default
#       default linux
#       label linux
#       kernel vmlinuz
#       append initrd=initrd.img ks=http://10.1.15.30/ks.cfg ksdevice=eth0
#  service dhcpd start
#  service httpd start
#  service xinetd start
 

你可能感兴趣的:(html,服务器,share)