#ksvalidator ks.cfg #检查语法错误
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
key --skip
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --enabled --ssh
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use network installation
url --url=ftp://192.168.1.254/pub/ #安装源!!
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot #记得安装完后重启.
#Root password
rootpw --iscrypted $1$vE2Y4QfD$aCRRXwJNxj.qDFI8hUkJE.
selinux --enforcing
# Do not configure the X Window System
skipx
# System timezone
timezone --isUtc Asia/Shanghai
# Install OS instead of upgrade
install
# Disk partitioning information #分区部分,kickstart这个软件无法做lvm,需要的自己写.
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part / --bytes-per-inode=4096 --fstype="ext3" --size=4096
part swap --bytes-per-inode=4096 --fstype="swap" --size=512
part /home --bytes-per-inode=4096 --fstype="ext3" --size=512
#参考写法
# Disk partitioning information
#part /boot --size=100
#part pv.16 --size=100 --grow
#volgroup vg01 --pesize=4096 pv.16
#logvol / --fstype ext3 --name=lvroot --vgname=vg01 --size=6144
#logvol /home --fstype ext3 --name=lvhome --vgname=vg01 --size=512
#logvol swap --fstype swap --name=lvswap2 --vgname=vg01 --size=256
#logvol swap --fstype swap --name=lvswap1 --vgname=vg01 --size=256
cat > /etc/yum.repos.d/server.repo << END
[base]
name=Red Hat Enterprise Linux Server
baseurl=ftp://192.168.1.254/pub/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
END
@base
@system-tools
@admin-tools
@chinese-support
@text-internet
@editors