[root@RHEL6 /root]$cat anaconda-ks.cfg

# Kickstart file automatically generated by anaconda.
 
#version=DEVEL
install
#光盘安装
cdrom
#语言
lang en_US.UTF-8
#键盘布局
keyboard us
#网络配置信息  先DHCP
network --onboot yes --device eth0 --bootproto dhcp
#设置root密码
rootpw  --iscrypted $1$ZSLG.oml$qtpjSFDA/Ic01CzvSQyhY/
# Reboot after installation
reboot
#防火墙开启22端口
firewall --service=ssh
#加密认证方法
authconfig --useshadow --enablemd5
#selinux配置
selinux --enforcing
#时区,这里选最好选中国Asia/Shanghai,否则安装好还要改时区
timezone --utc Asia/Shanghai
#启动引导分区
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --initlabel
#采用了自动分区
#part /boot --fstype=ext4 --size=300
#part swap --grow --maxsize=4032 --size=4032
#part / --fstype=ext4 --grow --size=3000
 
 
 
#安装时候选择的软件包
%packages
@Base
@Core
@Desktop
@Fonts
@General Purpose Desktop
@Internet Browser
@X Window System
binutils
gcc
kernel-devel
make
patch
python
 
%end
 
%post
cp /boot/grub/menu.lst /boot/grub/grub.conf.bak
sed -i 's/ rhgb//' /boot/grub/grub.conf
cp /etc/rc.d/rc.local /etc/rc.local.backup
cat >>/etc/rc.d/rc.local <
echo
echo "Installing VMware Tools, please wait..."
if [ -x /usr/sbin/getenforce ]; then oldenforce=\$(/usr/sbin/getenforce); /usr/sbin/setenforce permissive || true; fi
mkdir -p /tmp/vmware-toolsmnt0
for i in hda sr0 scd0; do mount -t iso9660 /dev/\$i /tmp/vmware-toolsmnt0 && break; done
cp -a /tmp/vmware-toolsmnt0 /opt/vmware-tools-installer
chmod 755 /opt/vmware-tools-installer
cd /opt/vmware-tools-installer
mv upgra32 vmware-tools-upgrader-32
mv upgra64 vmware-tools-upgrader-64
mv upgrade.sh run_upgrader.sh
chmod +x /opt/vmware-tools-installer/*upgr*
umount /tmp/vmware-toolsmnt0
rmdir /tmp/vmware-toolsmnt0
if [ -x /usr/bin/rhgb-client ]; then /usr/bin/rhgb-client --quit; fi
cd /opt/vmware-tools-installer
./run_upgrader.sh
mv /etc/rc.local.backup /etc/rc.d/rc.local
rm -rf /opt/vmware-tools-installer
sed -i 's/3:initdefault/5:initdefault/' /etc/inittab
mv /boot/grub/grub.conf.bak /boot/grub/grub.conf
if [ -x /usr/sbin/getenforce ]; then /usr/sbin/setenforce \$oldenforce || true; fi
if [ -x /bin/systemd ]; then systemctl restart prefdm.service; else telinit 5; fi
EOF
/usr/sbin/adduser jxd
/usr/sbin/usermod -p '$1$ZSLG.oml$qtpjSFDA/Ic01CzvSQyhY/' jxd
/usr/bin/chfn -f "jiangxundong" jxd
%end
 
 
 
 
=========================================================================
2013-03-30  完全安装的KS文件
[root@RHEL6 /root]$cat anaconda-ks.cfg
# Kickstart file automatically generated by anaconda.
 
#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot no --device eth0 --bootproto static --ip 192.168.0.5 --netmask 255.255.255.0 --gateway 192.168.0.1 --noipv6 --hostname RHEL6.3
rootpw  --iscrypted $6$LhJ40AeKlvAcFhCF$1jwVWjJ2n1ZBL8RFPjEH6Es3/5OvzpL4yQ4azDW/GbHlMeiIQidm17tWYbr922Lx6c9eL8Zljs4zjzSvhzCtP/
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --linux --drives=sda
 
#part /boot --fstype=ext4 --size=500
#part pv.008002 --grow --size=1
 
#volgroup vg_rhel6 --pesize=4096 pv.008002
#logvol /home --fstype=ext4 --name=lv_home --vgname=vg_rhel6 --size=10240
#logvol /opt --fstype=ext4 --name=lv_opt --vgname=vg_rhel6 --size=20460
#logvol /oracle --fstype=ext4 --name=lv_oracle --vgname=vg_rhel6 --size=814684
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_rhel6 --size=112640
#logvol swap --name=lv_swap --vgname=vg_rhel6 --size=4032
#logvol /tmp --fstype=ext4 --name=lv_tmp --vgname=vg_rhel6 --size=10240
#logvol /usr --fstype=ext4 --name=lv_usr --vgname=vg_rhel6 --size=10240
#logvol /var --fstype=ext4 --name=lv_var --vgname=vg_rhel6 --size=40960
 
 
%packages
@additional-devel
@backup-client
@backup-server
@base
@cifs-file-server
@chinese-support
@client-mgmt-tools
@compat-libraries
@console-internet
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@desktop-platform-devel
@development
@dial-up
@directory-client
@directory-server
@mail-server
@eclipse
@emacs
@british-support
@storage-client-fcoe
@ftp-server
@fonts
@general-desktop
@graphical-admin-tools
@graphics
@hardware-monitoring
@identity-management-server
@infiniband
@input-methods
@internet-browser
@java-platform
@kde-desktop
@large-systems
@legacy-unix
@legacy-x
@mainframe-access
@system-management-messaging-client
@mysql-client
@mysql
@nfs-file-server
@network-server
@storage-server
@network-file-system-client
@network-tools
@php
@performance
@perl-runtime
@postgresql-client
@postgresql
@print-server
@print-client
@remote-desktop-clients
@ruby-runtime
@system-management-snmp
@scientific
@security-tools
@server-platform
@server-platform-devel
@server-policy
@smart-card
@storage-client-multipath
@system-management
@system-admin-tools
@system-management-messaging-server
@tex
@technical-writing
@turbogears
@virtualization
@virtualization-client
@virtualization-platform
@virtualization-tools
@web-server
@web-servlet
@system-management-wbem
@x11
@storage-client-iscsi
libXinerama-devel
openmotif-devel
libibverbs-devel
libXmu-devel
xorg-x11-proto-devel
startup-notification-devel
libgnomeui-devel
libbonobo-devel
junit
libXau-devel
libgcrypt-devel
popt-devel
libdrm-devel
libXrandr-devel
libxslt-devel
libglade2-devel
gnutls-devel
bacula-client
mtx
mt-st
yum-plugin-aliases
tboot
subscription-manager-migration-data
nss_db
rsyslog-gssapi
udftools
rsyslog-relp
audispd-plugins
python-volume_key
yum-plugin-versionlock
sox
dumpet
cpufrequtils
subscription-manager-migration
gpm
yum-plugin-tmprepo
pax
python-dmidecode
uuidd
yum-presto
oddjob
wodim
volume_key
squashfs-tools
star
kernel-doc
tunctl
yum-plugin-downloadonly
sgpio
yum-plugin-changelog
genisop_w_picpath
brltty
yum-plugin-verify
x86info
dos2unix
unix2dos
kabi-yum-plugins
edac-utils
device-mapper-persistent-data
logwatch
rsyslog-gnutls
PyPAM
mkbootdisk
ecryptfs-utils
mtools
zsh
ncurses-term
tdb-tools
matahari
mingw32-matahari
ftp
lftp
fetchmail
irssi
jwhois
mutt
glibc-utils
systemtap-client
memtest86+
gdb-gdbserver
lslk
flightrecorder
systemtap-initscript
abrt-gui
qt-mysql
desktop-file-utils
ant
expect
rpmdevtools
jpackage-utils
rpmlint
pptp
efax
isdn4k-utils
rp-pppoe
krb5-appl-clients
samba-winbind
hesinfo
krb5-pkinit-openssl
certmonger
openldap-clients
pam_krb5
krb5-workstation
nscd
pam_ldap
ldapjdk
nss-pam-ldapd
ypserv
migrationtools
openldap-servers
samba
krb5-server-ldap
krb5-server
dovecot-pgsql
dovecot-mysql
mailman
sendmail
sendmail-cf
dovecot-pigeonhole
cyrus-imapd
xferstats
netpbm-progs
ImageMagick
edac-utils
i2c-tools
lm_sensors
nuxwdog
slapi-nis
qperf
perftest
libibcommon
compat-dapl
mstflint
infiniband-diags
srptools
opensm
icedtea-web
cups-lpd
talk-server
rsh
dump
telnet-server
finger-server
mksh
rwho
rsh-server
rusers
telnet
tcp_wrappers
finger
ncompress
tftp
rusers-server
krb5-appl-servers
ksh
talk
authd
openmotif
xterm
xorg-x11-xdm
libXmu
libXp
x3270-text
python-saslwrapper
ruby-irb
perl-DBD-MySQL
syslinux
bind-chroot
bind
rsyslog-pgsql
rsyslog-gssapi
rsyslog-mysql
rsyslog-gnutls
quagga
dnsmasq
radvd
rsyslog-relp
dhcp
bind-dyndb-ldap
tftp-server
freeradius
isns-utils
cachefilesd
ebtables
arpwatch
ipset
mipv6-daemon
mrtg
stunnel
iptstate
iptraf
netlabel_tools
lksctp-tools
NetworkManager-openswan
dropwatch
wireshark
nmap
arptables_jf
sdparm
papi
sg3_utils
tuned-utils
tuned
oprofile-jit
perl-LDAP
perl-DBD-SQLite
perl-Date-Calc
perl-suidperl
perl-Date-Manip
perl-Mozilla-LDAP
perl-Frontier-RPC
hplip-gui
hplip
rdesktop
ruby-irb
mvapich2
mvapich-psm-devel
gsl-static
lapack
openmpi
openmpi-devel
atlas
mvapich
compat-openmpi
numpy
gsl-devel
mpitests-openmpi
mvapich2-psm-devel
mpich2
mpitests-mvapich2
fftw-static
fftw-devel
mvapich-psm-static
compat-openmpi-psm
mpitests-mvapich
fftw
gsl
tpm-tools
amtu
aide
trousers
openscap
hmaccalc
openscap-utils
opencryptoki
symlinks
rrdtool
pexpect
dtach
mc
xdelta
screen
tree
mgetty
hardlink
expect
conman
crypto-utils
scrub
rdist
vlock
lsscsi
libvirt-java
mod_auth_kerb
mod_nss
certmonger
perl-CGI
python-memcached
mod_revocator
memcached
tog-pegasus