Skip to content

Instantly share code, notes, and snippets.

@vishnumitraha
Last active October 21, 2021 05:30
Show Gist options
  • Save vishnumitraha/5884296774a081473128442093d2fd2d to your computer and use it in GitHub Desktop.
Save vishnumitraha/5884296774a081473128442093d2fd2d to your computer and use it in GitHub Desktop.
MEAN stack for CAP Admin - Debian10 Buster

Install NodeJS,Meteor JS, MongoDB and Nginx with CAP admin packages.

Noda Js

sudo apt update
sudo apt install nodejs npm

mongodb

sudo apt install dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl
curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main'
sudo apt install mongodb-org
sudo systemctl enable mongod --now

Nginx

sudo apt install nginx
sudo ufw allow 'Nginx HTTP'
sudo ufw allow 'Nginx HTTPS'
sudo systemctl enable nginx

Meteor JS

New Method with root permission
npm install -g meteor
Old method
curl https://install.meteor.com/ | sh

Setup certbot and get new SSL certificate

sudo apt install python3-acme python3-certbot python3-mock python3-openssl python3-pkg-resources python3-pyparsing python3-zope.interface
sudo apt install certbot python3-certbot-nginx

**Check the file /etc/nginx/sites-available/default and change the Domain Name. **

Test the conf with following command
sudo nginx -t
sudo certbot --nginx -d Domain.Name
sudo systemctl status certbot.timer
sudo certbot renew --dry-run

Domain.Name = your site name - eg testing.cmcvellore.edu.in

Download CAP Admin from Repo and extract (Use the attachment pack.sh file.
cd /capadmin/app/
./pack.sh

To restore the mongodb use the mongorestore command (meteor mongo)

mongorestore -h 127.0.0.1 --port 3001 -d meteor /home/location/of/the/dump

Setup certbot and get new SSL certificate

meteor npm install --save datatables.net-bs datatables.net-select datatables.net-buttons
meteor npm install --save datatables.net-responsive datatables.net-responsive-dt jszip pdfmake
meteor npm install --save datatables-select @fortawesome/fontawesome-free datatables.net datatables-buttons
meteor npm install --save @babel/runtime datatables.net-bs datatables.net-select datatables.net-buttons
meteor npm install --save datatables.net-responsive datatables.net-responsive-dt jszip pdfmake
meteor npm install --save datatables-select @fortawesome/fontawesome-free
meteor npm install --save datatables.net datatables-buttons
meteor npm install --save datatables.net-fixedcolumns-bs
meteor npm install --save xlsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment