Skip to content

Instantly share code, notes, and snippets.

@austinsonger
Created February 11, 2020 21:54
Show Gist options
  • Save austinsonger/645e2aaa4f80a492740a1ece98eccc0b to your computer and use it in GitHub Desktop.
Save austinsonger/645e2aaa4f80a492740a1ece98eccc0b to your computer and use it in GitHub Desktop.
WIKI JS INSTALL
dpkg-reconfigure tzdata
apt replace && apt improve -y
apt set up -y curl wget vim git unzip socat sudo bash-completion apt-transport-https build-essential dirmngr
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt set up -y nodejs
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | sudo tee /and so forth/apt/sources.listing.d/mongodb-org-4.0.listing
sudo apt-get replace
sudo apt-get set up -y mongodb-org
sudo systemctl begin mongod.service
sudo systemctl allow mongod.service
wget https://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
rm nginx_signing.key
sudo -s
printf "deb https://nginx.org/packages/mainline/debian/ $(lsb_release -sc) nginxndeb-src https://nginx.org/packages/mainline/debian/ $(lsb_release -sc) nginxn" >> /and so forth/apt/sources.listing.d/nginx_mainline.listing
exit
sudo apt replace
sudo apt set up -y nginx
sudo systemctl allow nginx.service
sudo systemctl begin nginx.service
<!--
sudo /nginx/conf.d/wiki.js.conf
server {
pay attention [::]:443 ssl http2;
pay attention 443 ssl http2;
pay attention [::]:80;
pay attention 80;
server_name instance.com;
charset utf-8;
client_max_body_size 50M;
ssl_certificate /and so forth/letsencrypt/instance.com/fullchain.pem;
ssl_certificate_key /and so forth/letsencrypt/instance.com/personal.key;
ssl_certificate /and so forth/letsencrypt/instance.com_ecc/fullchain.pem;
ssl_certificate_key /and so forth/letsencrypt/instance.com_ecc/personal.key;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Actual-IP $remote_addr;
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Improve $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream error timeout http_502 http_503 http_504;
}
}
-->
sudo systemctl reload nginx.service
sudo mkdir -p /var/www/wiki.js
cd /var/www/wiki.js
sudo chown -R <user>:<user> /var/www/wiki.js
curl -sSo- https://wiki.js.org/install.sh | bash
node wiki configure
/var/www/wiki.js/node_modules/pm2/bin/pm2 startup
/var/www/wiki.js/node_modules/pm2/bin/pm2 save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment