-
Notifications
You must be signed in to change notification settings - Fork 2
/
centos7-init.sh
37 lines (32 loc) · 1014 Bytes
/
centos7-init.sh
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
# This is the minimal set of things needed to get the rest of the install scripting to work.
# Unfortunately due to KVM's lack of cut and paste, you need to type this by hand first -
#
# curl --remote-name https://raw.githubusercontent.com/SolidWallOfCode/tools/master/centos7-init.sh
#
# That should retrieve this file. After runing this, CentOS 7 should be sufficiently bootstrapped
# to get everything else via ~/git/tools and be able to remote log in.
#
cd ~
if [ ! -d git ] ; then
mkdir git
fi
if [ ! -d git/tools ] ; then
sudo yum install git
cd git
git clone https://github.com/solidwallofcode/tools.git
cd ~
fi
if [ ! -d .ssh ] ; then
mkdir .ssh
chmod 700 .ssh
fi
cd .ssh
cp ~/git/tools/keys/*.pub.key .
cat tidus.pub.key >> authorized_keys
cat waka.pub.key >> authorized_keys
cat tifa.pub.key >> authorized_keys
cat besaid.pub.key >> authorized_keys
cat spira.pub.key >> authorized_keys
chmod 600 *
# Used to be seperate, but why not everytime? Less hassle.
sudo yum install epel-release