This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_elementary_os_0.4.1_loki
executable file
·92 lines (75 loc) · 3.48 KB
/
install_elementary_os_0.4.1_loki
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
#!/bin/bash
echo "=== Set right sudo premissions for systemd ==="
# setze sudo rechte und keine passwort eingabe
echo "arsnova ALL=(ALL) NOPASSWD: ALL" > 011_arsnova-nopasswd
sudo chown root:root 011_arsnova-nopasswd
sudo mv 011_arsnova-nopasswd /etc/sudoers.d/011_arsnova-nopasswd
#-------------------------------------------------------------------------------
echo "=== Install dependecies ==="
# installieren von moeglichen fehlenden Packeten
sudo apt-get update
sudo apt-get install curl unzip libjs-mathjax
echo "=== Install NodeJS ==="
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
# installiere nodejs Erweiterungspackete
sudo npm install forever fibers underscore source-map-support semver -g
npm install forever fibers underscore source-map-support semver
sudo mv node_modules /home/arsnova
sudo chown -R arsnova:arsnova /home/arsnova/node_modules
# dieser symlink ist wichtig damit die Applikation ordentlich startet
sudo ln -s /home/arsnova/build/bundle/programs/server/npm/node_modules/phantomjs/ /opt/phantomjs
#-------------------------------------------------------------------------------
echo "=== Install and configure MongoDB ==="
sudo apt-get install mongodb
sudo systemctl enable mongodb.service
sudo systemctl start mongodb.service
mongo < mongodb_config_v2.6.10.js
sudo systemctl restart mongodb.service
systemctl status mongodb.service
echo "=== Install and configure Nginx ==="
sudo useradd -m meteor
sudo mkdir /home/meteor/logs
sudo chown meteor:meteor /home/meteor/logs/
# hole stable release von nginx
sudo bash -c 'echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu xenial main" > /etc/apt/sources.list.d/nginx.list'
sudo bash -c 'echo "deb-src http://ppa.launchpad.net/nginx/stable/ubuntu xenial main" >> /etc/apt/sources.list.d/nginx.list'
sudo apt-get update
sudo apt-get install nginx-full
# hole Konfiguration von nginx von arsnova.click
#wget https://git.thm.de/arsnova/arsnova.click/raw/server-config/config/app-server/etc/nginx/sites-available/meteor
#sed -i 's/yourdomain.com/\_/' meteor
#sudo mv meteor /etc/nginx/sites-available
sudo cp etc/nginx/sites-available/meteor /etc/nginx/sites-available
sudo ln -s /etc/nginx/sites-available/meteor /etc/nginx/sites-enabled/meteor
sudo rm /etc/nginx/sites-enabled/default
# starte nginx
sudo systemctl enable nginx.service
sudo systemctl start nginx.service
systemctl status nginx.service
echo "=== Install ARSnova.click ==="
wget https://git.thm.de/arsnova/arsnova.click/builds/artifacts/master/download?job=build -O artifacts.zip
unzip artifacts.zip -d .
sudo mv build /home/arsnova/
sudo chown -R arsnova:arsnova /home/arsnova/build
rm artifacts.zip
## The content of this file need to be inside of the systemd start sccript
#wget https://git.thm.de/arsnova/arsnova.click/raw/staging/arsnova.click/settings.json
##
sudo cp etc/systemd/system/arsnova-click.service /etc/systemd/system/
sudo systemctl daemon-reload
#sudo systemctl enable arsnova-click.service
#systemctl status arsnova-click.service
#sudo systemctl start arsnova-click.service
#systemctl status arsnova-click.service
echo "=== Copy arsnova.py ==="
sudo cp bin/arsnova.py /bin
sudo cp bin/arsnova /bin
sudo cp usr/share/icons/arsNovaClick-192.png /usr/share/icons
sudo cp usr/share/applications/arsnova.desktop /usr/share/applications/arsnova.desktop
sudo cp -r usr/lib/python3/appJar /usr/lib/python3.5/
echo "=== Update system ==="
sudo apt-get upgrade
sudo apt-get dist-upgrade
# after the system update a reboot is recommended
sudo reboot