-
Notifications
You must be signed in to change notification settings - Fork 70
/
centos-test.cfg
120 lines (110 loc) · 2.46 KB
/
centos-test.cfg
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# From: Miguel Filho <[email protected]>
#
# kickstart 32bit
# I use this kickstart to bootstrap VMs for playing arround
bootloader --location=mbr
zerombr yes
cmdline
firewall --disabled
firstboot --disable
keyboard br-abnt2
lang en_US
reboot
url --url=http://mirrors.ic.unicamp.br/centos/5/os/x86_64
network --bootproto=static --device=eth0 --gateway=10.0.0.1 --ip=10.0.0.2 --nameserver=143.106.7.31,143.106.2.5 --netmask=255.255.255.192 --onboot=on --hostname="centos-test"
rootpw xuxuxu
selinux --disabled
skipx
timezone --isUtc America/Sao_Paulo
install
clearpart --all
part /boot --asprimary --fstype="ext3" --size=100
part pv.01 --size=1 --grow
volgroup volumes pv.01
logvol / --fstype="ext3" --vgname=volumes --size=8000 --name=root --fsoptions="noatime,nodiratime"
#logvol /var --fstype="ext3" --vgname=volumes --size=6114 --name=var --fsoptions="noatime,nodiratime"
#logvol /tmp --fstype="ext3" --vgname=volumes --size=2048 --name=tmp --fsoptions="noatime,nodiratime"
logvol swap --fstype swap --vgname=volumes --size=1024 --name=swap
%packages --nobase
-sysklogd
-selinux-policy-targeted
-selinux-policy
-gtk2
-ecryptfs-utils
-trousers
-avahi
xorg-x11-xauth
iptables
audit
autofs
nfs-utils
ntsysv
rsyslog
vixie-cron
crontabs
vim-enhanced
psacct
postfix
screen
man
nc
ntp
amanda-client
sudo
rsync
tcpdump
nmap
iptraf
lynx
wget
curl
strace
dstat
tcsh
quota
bind-utils
tmpwatch
krb5-workstation
pam_krb5
openldap-clients
nss_ldap
cyrus-sasl-gssapi
%post
chvt 3
(
echo "[+] Ajustando repositorios"
sed -i "/^#*mirrorlist=/d" /etc/yum.repos.d/CentOS-Base.repo
sed -i "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/mirrors.ic.unicamp.br/" /etc/yum.repos.d/CentOS-Base.repo
sed -i "s/enabled=1/enabled=0/" /etc/yum/pluginconf.d/fastestmirror.conf
echo "[+] Atualizando pacotes"
yum clean all
yum -y update
yum clean packages
mkdir /root/.ssh
cat > /root/.ssh/authorized_keys <<EOF
from="xxx" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzmhMmtYXOPaCGCvjau5nPnMbDAN
EOF
echo "[+] Desligando servicos"
chkconfig gpm off
chkconfig iscsi off
chkconfig iscsid off
chkconfig haldaemon off
chkconfig libvirtd off
chkconfig kudzu off
chkconfig messagebus off
chkconfig gpm off
chkconfig avahi-daemon off
chkconfig rawdevices off
chkconfig iptables off
chkconfig ip6tables off
chkconfig saslauthd off
chkconfig mcstrans off
chkconfig restorecond off
chkconfig nfslock on
chkconfig psacct on
chkconfig rsyslog on
chkconfig rpcgssd on
echo "[+] Amen!"
) 2>&1 | tee /root/ks-post.log
chvt 1