-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
36 lines (27 loc) · 1.2 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
# Configure mongodb.list file with the correct location
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
# Disable THP
sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
sudo echo never > /sys/kernel/mm/transparent_hugepage/defrag
sudo grep -q -F 'transparent_hugepage=never' /etc/default/grub || echo 'transparent_hugepage=never' >> /etc/default/grub
# Install updates
sudo apt-get -y update
# Modified tcp keepalive according to https://docs.mongodb.org/ecosystem/platforms/windows-azure/
sudo bash -c "sudo echo net.ipv4.tcp_keepalive_time = 120 >> /etc/sysctl.conf"
# Install Mongo DB
sudo apt-get install -y mongodb-org
# Start Mongo DB
sudo service mongod start
# Install nginx
sudo apt-get install -y nginx
sudo ufw allow 'Nginx Full'
# Configure Node.js PPA
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# Install Node.js LTS
sudo apt-get install nodejs
# Install Wiki.js
sudo mkdir -p /var/www/wiki
cd /var/www/wiki
npm install wiki.js@latest
node wiki configure