Skip to content

Instantly share code, notes, and snippets.

@dnozay
Created July 22, 2015 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnozay/e3b34bea067d06251443 to your computer and use it in GitHub Desktop.
Save dnozay/e3b34bea067d06251443 to your computer and use it in GitHub Desktop.
centos 6 kickstart file.
install
#cmdline
text
skipx
reboot --eject
# we're using a VM
unsupported_hardware
# please remember to change this
rootpw donothardcodepasswords!
# installation sources
url --url http://mirror.centos.org/centos/6/os/x86_64
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/6/x86_64/
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto dhcp --nameserver=10.0.0.2 --hostname=name.example.com
firewall --service=ssh
authconfig --useshadow --enablemd5
selinux --enforcing
timezone --utc America/Los_Angeles
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
#ignoredisk --drives=sdb,sdc,sdd,sde
zerombr
clearpart --all --drives=sda --initlabel
part /boot --fstype=ext4 --size=300
part swap --grow --maxsize=4000 --size=4000
part / --fstype=ext4 --grow --size=3000
%packages
@Base
@Core
policycoreutils-python
# epel
epel-release
# auth via ldap
authconfig
pam_ldap
openldap-clients
nss-pam-ldapd
sssd
# config
salt-minion
# autofs
autofs
libsss_autofs
nfs-utils
# development
mysql
binutils
gcc
gcc-c++
kernel-devel
make
patch
python
python-devel
python-pip
python-ldap
pycairo
git-core
glibc.i686
zlib-devel.i686
libstdc++.i686
ant
boost
cpan
%end
%post --nochroot
echo "################################"
echo "# Running Post Configuration #"
echo "################################"
SYSIMG=/mnt/sysimage
cat > $SYSIMG/etc/resolv.conf << EOF
domain example.com
search test.example.com example.com
nameserver 10.0.0.2
EOF
chkconfig salt-minion on
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment