Created
April 24, 2014 01:27
-
-
Save hensleyl/11238383 to your computer and use it in GitHub Desktop.
kickstart file for creating a centos 6 vagrant box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install | |
text | |
cdrom | |
lang en_US.UTF-8 | |
keyboard us | |
network --onboot yes --bootproto dhcp --noipv6 | |
timezone --utc America/New_York | |
zerombr | |
clearpart --all --initlabel | |
bootloader --location=mbr --append="crashkernel=auto rhgb quiet" | |
part /boot --fstype=ext3 --size=256 | |
part pv.01 --size=1024 --grow | |
volgroup vg_root pv.01 | |
logvol swap --fstype swap --name=lv_swap --vgname=vg_root --size=1024 | |
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --size=1024 --grow | |
authconfig --enableshadow --passalgo=sha512 | |
# rootpw is vagrant | |
rootpw --iscrypted $1$dUDXSoA9$/bEOTiK9rmsVgccsYir8W0 | |
firewall --disabled | |
selinux --permissive | |
skipx | |
shutdown | |
%packages | |
@core | |
openssh-server | |
openssh-clients | |
wget | |
curl | |
git | |
man | |
vim | |
ntp | |
%end | |
%post | |
chkconfig ntpd on | |
service ntpd stop | |
ntpdate time.nist.gov | |
service ntpd start | |
chkconfig sshd on | |
chkconfig iptables off | |
chkconfig ip6tables off | |
useradd vagrant | |
mkdir -m 0700 -p /home/vagrant/.ssh | |
curl https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub >> /home/vagrant/.ssh/authorized_keys | |
chmod 600 /home/vagrant/.ssh/authorized_keys | |
chown -R vagrant:vagrant /home/vagrant/.ssh | |
sed -i 's/^\(Defaults.*requiretty\)/#\1/' /etc/sudoers | |
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
cat << EOF1 > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE=eth0 | |
TYPE=Ethernet | |
ONBOOT=yes | |
NM_CONTROLLED=no | |
BOOTPROTO=dhcp | |
EOF1 | |
rm -f /etc/udev/rules.d/70-persistent-net.rules | |
yum clean all | |
rm -rf /tmp/* | |
rm -f /var/log/wtmp /var/log/btmp | |
history -c | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment