-
Notifications
You must be signed in to change notification settings - Fork 0
/
centos-6.6.txt
91 lines (65 loc) · 1.65 KB
/
centos-6.6.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
install
text
cdrom
lang en_US.UTF-8
keyboard us
network --onboot yes --bootproto dhcp --noipv6
timezone --utc America/Detroit
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 --enforcing
skipx
shutdown
%packages
@core
openssh-server
openssh-clients
curl
vim
%end
# check
git
man
wget
ntp
# check for 6.6
%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.githubusercontent.com/rex/kickstart-profiles/vagrant.pub >> /home/vagrant/.ssh/authorized_keys
# this is the default vagrant ssh key
curl https://raw.githubusercontent.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