-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathInstall.sh
64 lines (45 loc) · 1.12 KB
/
Install.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
echo "
----------------------
NODE
----------------------
"
### NODE & NPM ###
# add nodejs 10 ppa (personal package archive) from nodesource
curl -sL https://deb.nodesource.com/setup_10.x | -E bash -
## Recommendations ##
#development tools to build native addons
apt-get install gcc g++ make
#install Yarn packManager
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update && apt-get install -y yarn
# install nodejs and npm
apt-get install -y nodejs
echo "
----------------------
PM2
----------------------
"
# install pm2 with npm
npm install -y -g pm2
# set pm2 to start automatically on system startup
pm2 startup systemd
echo "
----------------------
NGINX
----------------------
"
# install nginx
apt-get install -y nginx
echo "
----------------------
UFW (FIREWALL)
----------------------
"
sudo apt-get install ufw
# allow ssh connections through firewall
ufw allow OpenSSH
# allow http & https through firewall
ufw allow 'Nginx Full'
# enable firewall
ufw --force enable