-
Notifications
You must be signed in to change notification settings - Fork 10
/
ks.cfg
145 lines (115 loc) · 3.81 KB
/
ks.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#
# Copyright 2016 - gatblau.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# EUROPA linux kick start file.
#
# Do a fresh install, not an upgrade
install
# Language for the install
lang en_GB.UTF-8
# The keyboard type
keyboard uk
# The timezone for this system
timezone Europe/London --isUtc
# Configure one or more NICs
network --onboot yes --device eth0 --bootproto dhcp --noipv6
# The root password
rootpw --iscrypted $1$UhHVki6U$187/tUM7fVo0MK7IHz5f0. #--plaintext Passw0rd!
# Firewall
firewall --disabled #--enabled --service=ssh
# Authentication options for the system
auth --useshadow --enablemd5
# Security Enhanced Linux
selinux --permissive
# Bootloader options
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# Do not use the GUI
text
# Initialises any invalid partition tables found on disks (optional)
zerombr
# Remove existing partitions for a clean install
clearpart --all --initlabel
# Create a default partition automatically
autopart
# Disable the firstboot programme
firstboot --disable
# Accepts the End User License Agreement without user interaction
eula --agreed
# Reboot the server after the install
reboot
# Define online repositories for packages to install
#url --url http://mirror.centos.org/centos/7.6.1810/os/x86_64/
#repo --name=epel --baseurl=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
#repo --name=updates --baseurl=http://mirror.centos.org/centos/7.6.1810/updates/x86_64/
# Define repositories for packages to install
#repo --name="Base" --baseurl=file:///run/install/repo/Base
#repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Use CDROM installation media
cdrom
# Define the manifest of rpm packages to install
# %packages --nobase
%packages
#@ Core #@core
#@ Base #@base
#@ Server with GUI #@x11
#@ GNOME #@gnome-desktop - A GNOME desktop
@^graphical-server-environment
@gnome-desktop
@base-x
# Required by Virtual Box Guest Additions
kernel-devel
kernel-headers
make
gcc
#dkms
bzip2
wget
openssh-clients
# nano
# htop
%end
%post
exec < /dev/console > /dev/console
# exec < /dev/tty3 > /dev/tty3
echo "\n"
echo "################################"
echo "# Running Post Configuration #"
echo "################################"
echo "\n"
echo "\nUpdating packages...\n"
yum -y upgrade
echo "\nTurning off unneeded services...\n"
chkconfig sendmail off
chkconfig vbox-add-x11 off
chkconfig smartd off
chkconfig ntpd off
chkconfig cupsd off
printf "\nCreating user Europa...\n"
/usr/sbin/groupadd -g 1000000001 europa
/usr/sbin/useradd europa -u 1000000001 -g europa -G wheel
echo "eur0pa"|passwd --stdin europa
echo "europa ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/europa
chmod 0440 /etc/sudoers.d/europa
printf "\nDisabling TTY so that sudo can be called without users being logged in a text only console...\n"
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
#printf "\nInstalling the GNOME Desktop...\n"
#yum -y groupinstall "gnome-desktop" "graphical-admin-tools"
printf "\nDONE Sleeping for 10 seconds...\n"
sleep 10
# Use graphical interface
xconfig --defaultdesktop=GNOME --startxonboot
# printf "\nEnabling the GUI on system start...\n"
systemctl set-default graphical.target
%end