-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.sh
111 lines (102 loc) · 3.64 KB
/
installer.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
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
#!/bin/bash
echo -n "Some things to remember:
- All Apache and Nginx config will be overridden
- Make sure ALL firewalls are disabled
- Make sure /var/www/html is empty
- Don't be an idiot
- Make sure you have sudo rights
- It is recommended to close all other apps before continuing
Continue?[y/n]: "
read yesorno
if [ $yesorno = 'y' ]; then
echo "Continuing..."
else
echo "Canceling..."
exit 0
fi
echo "Installing dependencies"
sudo apt install libsquashfuse0 squashfuse fuse -y
sudo apt install -y snapd wget ca-certificates jq lsb-release python3 python3-setuptools python3-dev python3-pip dnsmasq hostapd perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python apt-transport-https golang curl
sudo snap install core
sudo systemctl stop dnsmasq
sudo systemctl stop hostapd
echo "Installing server"
sudo apt-get install apache2 -y
sudo apt-get install php7.3 php7.3-gd sqlite php7.3-sqlite3 php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring -y
sudo mv 000-default.conf /etc/apache2/sites-available/000-default.conf
sudo mv ports.conf /etc/apache2/ports.conf
sudo systemctl restart apache2
mv ./scripts /var/www/html
HOSTNAME="$( hostname )";
echo "Updating"
sudo apt update -y
sudo apt upgrade -y
echo '{ "hostname": "'$HOSTNAME'", "rocket": false, "plex": false, "wiki": false, "next": false, "WAP": false, "webmin": false, "gitlab": false, "phet": false }' > /var/www/html/scripts/prefs.json
echo -n "Would you like to install Rocket.Chat?[y/n]: "
read rocket
if [ $rocket = 'y' ]; then
echo "Installing Rocket Chat"
sudo bash /var/www/html/scripts/rocket.sh
fi
echo -n "Would you like to install Plex Media Server?[y/n]: "
read plex
if [ $plex = 'y' ]; then
echo "Installing Plex Media Server"
sudo bash /var/www/html/scripts/plex.sh
fi
echo -n "Would you like to install Wikipedia?[y/n]: "
read wiki
if [ $wiki = 'y' ]; then
echo "Installing Wikipedia"
sudo bash /var/www/html/scripts/wiki.sh
fi
echo -n "Would you like to install Phet?[y/n]: "
read phet
if [ $phet = 'y' ]; then
echo "Installing Phet"
sudo bash /var/www/html/scripts/phet.sh
fi
sudo mv index.php /var/www/html
sudo mv logo /var/www/html
sudo mv backdrops /var/www/html
echo -n "Would you like to install Nextcloud?[y/n]: "
read next
if [ $next = 'y' ]; then
echo "Installing Nextcloud"
sudo bash /var/www/html/scripts/next.sh
fi
echo -n "Would you like to setup a Wireless Access Point?[y/n]: "
read wifiap
if [ $wifiap = 'y' ]; then
echo "Setting up Wireless Access Point"
sudo bash /var/www/html/scripts/WAP.sh
fi
echo -n "Would you like to install webmin (highly recomended)?[y/n]: "
read webmin
if [ $webmin = 'y' ]; then
echo "Installing webmin"
sudo bash /var/www/html/scripts/webmin.sh
fi
echo -n "Would you like to install Gitlab?[y/n]: "
read gitlab
if [ $gitlab = 'y' ]; then
echo "Installing Gitlab"
sudo bash /var/www/html/scripts/gitlab.sh
fi
IP="$( hostname -I | awk '{print $1}' )"
if [ $next = 'y' ]; then
echo "DO: Visit http://$HOSTNAME.local/nextcloud to configure your Nextcloud instance."
fi
if [ $gitlab = 'y' ]; then
echo "DO: Visit http://$HOSTNAME.local:6969 to configure your Gitlab instance."
fi
if [ $rocket = 'y' ]; then
echo "DO: Visit http://$HOSTNAME.local:3000 to configure your Rocket.Chat instance."
fi
if [ $wiki = 'y' ]; then
echo "NOTE A: Depending how large your zim file was, it may still take a while for it to fully index."
fi
echo "NOTE: Visit http://$HOSTNAME.local to see all apps.
NOTE: Have fun!
NOTE: SSL errors is nromal. If you are using Chrome, to bypass the warning, wait for the page to fully load and just type to the page "thisisunsafe"."
exit 0