Repository navigation
Expand file tree
/
Copy pathFresh_Server_Install.sh
More file actions
72 lines (58 loc) · 1.73 KB
/
Copy pathFresh_Server_Install.sh
File metadata and controls
72 lines (58 loc) · 1.73 KB
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
# SYNOPSIS
# Install default apps and run default configurations. Must be run as ROOT.
# DESCRIPTION
# Install the follwing applications:
# 1. nfs-common - Needed for backing up to NAS
# 2. cifs-utils - Needed to connecto to Windows shares
# 3. Webmin - Web GUI for server management
# 4. Docker - Container Platform
# 5. Docker Compose v2 - Define and build containers for Docker
# Complete the following configurations:
# 1. Create mount directory for System_Backup.sh
# 2. Update fstab with backup mount point
# 3. Mount new mount point
# 4. Create ssh key directory
# NOTES
# File Name : Fresh_Server_Instal.sh
# Version : 0.4
# Author : BJ Beier - https://github.com/bjbeier/Linux-Base-Scripts
# Set Shell
#!/bin/bash
# Check that we are root!
if [[ ! $(whoami) =~ "root" ]]; then
echo ""
echo "**********************************"
echo "*** This needs to run as root! ***"
echo "**********************************"
echo ""
exit
fi
#
# App Installations
#
# Update repositories
apt update
# Install nfs-common
apt install nfs-common -y
# Install cifs-utils
apt install cifs-utils -y
# Install Webmin
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
sh setup-repos.sh -y
apt install webmin -y
rm -f setup-repos.sh
# Install Docker
apt install docker.io -y
# Install Docker Compose v2
apt install docker-compose-v2 -y
#
# Configurations
#
# Create /mnt/Backups
mkdir /mnt/Backups
# Update fstab with network location for NAS
echo '192.168.4.140:/volume1/Backups /mnt/Backups nfs x-systemd.automount 0 0' >> /etc/fstab
# Mount new location
mount -a
# Create ssh key directory
mkdir ~/.ssh/