批量部署Linux机器(RedHat5.4/CentOS5.3)(2)

default ct53_32
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img
label text
  kernel vmlinuz
  append initrd=initrd.img text
label local
  localboot 1
label memtest86
  kernel memtest
  append -

label ct53_32
  kernel centos5.3/vmlinuz
  append initrd=centos5.3/initrd.img ks=nfs:192.168.1.199:/tftpboot/ks/ct53_32.cfg devfs=nomount ramdisk_size=4096 nofb text
label rh54_32
  kernel redhat5.4/vmlinuz
  append initrd=redhat5.4/initrd.img ks=nfs:192.168.1.199:/tftpboot/ks/rh54_32.cfg devfs=nomount ramdisk_size=4096 nofb text

############/tftpboot/ks/rh54_32.cfg#############

# Kickstart file automatically generated by anaconda.

install
nfs --server=192.168.1.199 --dir=/data/redhat5.4
lang en_US.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8
keyboard us
key --skip
network --bootproto=dhcp --device=eth0 --onboot=on
rootpw --iscrypted $1$XPr0sv0o$1.XsUW0h36ZdWetQOefR21
firewall --disabled
selinux --disabled
authconfig --enableshadow --enablemd5
timezone Asia/Shanghai
bootloader --location=mbr
#disk
clearpart --all --initlabel
part /boot --fstype ext3 --size=100
part / --fstype ext3 --size=12000
part swap --fstype swap --size=1024

%packages
@admin-tools
@editors

@base
@system-tools
@dialup
@server-cfg
@development-tools
@ruby
@text-internet
net-snmp

%post
/sbin/chkconfig --level 2345 anacron off
/sbin/chkconfig --level 2345 apmd off
/sbin/chkconfig --level 2345 atd off
/sbin/chkconfig --level 2345 gpm off
/sbin/chkconfig --level 2345 httpd off
/sbin/chkconfig --level 2345 identd off
/sbin/chkconfig --level 2345 ipchains off
/sbin/chkconfig --level 2345 isdn off
/sbin/chkconfig --level 2345 keytable off
/sbin/chkconfig --level 2345 kudzu off
/sbin/chkconfig --level 2345 linuxconf off
/sbin/chkconfig --level 2345 lpd off
/sbin/chkconfig --level 2345 netfs off
/sbin/chkconfig --level 2345 nfslock off
/sbin/chkconfig --level 2345 pcmcia off
/sbin/chkconfig --level 2345 portmap off
/sbin/chkconfig --level 2345 random off
/sbin/chkconfig --level 2345 rawdevices off
/sbin/chkconfig --level 2345 rhnsd off
/sbin/chkconfig --level 2345 sgi_fam off
/sbin/chkconfig --level 2345 sshd off
/sbin/chkconfig --level 2345 xfs off
/sbin/chkconfig --level 2345 xinetd off
/sbin/chkconfig --level 2345 cups off
/sbin/chkconfig --level 2345 hpoj off
/sbin/chkconfig --level 2345 mdmpd off
/sbin/chkconfig --level 2345 firstboot off
/sbin/chkconfig --level 2345 arptables_jf off
/sbin/chkconfig --level 2345 mdmonitor off
/sbin/chkconfig --level 2345 smartd off
/sbin/chkconfig --level 2345 messagebus off
/sbin/chkconfig --level 2345 acpid off
/sbin/chkconfig --level 2345 avahi-daemon off
/sbin/chkconfig --level 2345 rpcsvcgssd  off
/sbin/chkconfig --level 2345 rpcgssd off
/sbin/chkconfig --level 2345 rpcidmapd off
/sbin/chkconfig --level 2345 irqbalance on
/sbin/chkconfig --level 2345 bluetooth off
/sbin/chkconfig --level 2345 psacct on
/sbin/chkconfig --level 2345 sshd on
/sbin/chkconfig --level 2345 snmpd on

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/23365.html