Skip to content

Instantly share code, notes, and snippets.

@rilindo
Created December 17, 2011 23:31
Show Gist options
  • Save rilindo/1491788 to your computer and use it in GitHub Desktop.
Save rilindo/1491788 to your computer and use it in GitHub Desktop.
Kickstart Reference System 6.1
# Kickstart file automatically generated by anaconda.
#version=RHEL6
install
url --url http://192.168.15.100/mirrors/centos/6.1/os/x86_64/
lang en_US.UTF-8
keyboard us
text
#skipx
network --device eth0 --bootproto dhcp --hostname centos61.test.monzell.com
rootpw --iscrypted PASS
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=vda --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 --drives=vda --initlabel
part /boot --fstype=ext4 --size=500
part pv.EPlgaf-h1b4-YqDI-2wfs-3C7I-SPPt-Agk5O7 --grow --size=1
volgroup vg_centos6 --pesize=4096 pv.EPlgaf-h1b4-YqDI-2wfs-3C7I-SPPt-Agk5O7
logvol / --fstype=ext4 --name=lv_root --vgname=vg_centos6 --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_centos6 --grow --size=1008 --maxsize=2016
repo --name="Local CentOS 6 - x86_64" --baseurl=http://192.168.15.100/mirrors/centos/6.1/os/x86_64
repo --name="Local CentOS 6 - x86_64 - Updates" --baseurl=http://192.168.15.100/mirrors/centos/6.1/updates/x86_64
repo --name="Local Custom Installs" --baseurl=http://192.168.15.100/mirrors/customrepos/centos/x86_64
%packages
@base
@console-internet
@core
@debugging
@directory-client
@hardware-monitoring
@large-systems
@network-file-system-client
@performance
@perl-runtime
@scalable-file-systems
@server-platform
pax
oddjob
sgpio
certmonger
pam_krb5
krb5-workstation
nscd
pam_ldap
nss-pam-ldapd
perl-DBD-SQLite
%end
%post --log=/root/my-post-log
chkconfig sssd on
chkconfig rpcbind on
URLPOSTCONF="http://192.168.15.100/mirrors/ks"
setsebool -P use_nfs_home_dirs on
mkdir /home/users
curl ${URLPOSTCONF}/6.1/repos/CentOS-Custom.repo -o /etc/yum.repos.d/CentOS-Custom.repo
curl ${URLPOSTCONF}/6.1/autofs/auto.master -o /etc/auto.master
curl ${URLPOSTCONF}/6.1/autofs/auto.home -o /etc/auto.home
curl ${URLPOSTCONF}/keys/cacert.pem -o /etc/openldap/cacerts/cacert.pem
rpm --import ${URLPOSTCONF}/keys/legacy.key
rpm --import ${URLPOSTCONF}/keys/custom.key
authconfig --enablesssd --enableldap --enableldaptls --ldapserver=kerberos.monzell.com --ldapbasedn="dc=monzell,dc=com" --enableldapauth --update
sync
%end
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment