Install NodeJS

$ sudo apt-get update

$ sudo apt-get install nodejs

$ sudo apt-get install npm

Install sudo

$ sudo apt-get update

$ sudo apt-get install sudo

Install git

$ sudo apt-get update

$ sudo apt-get install git

Install screen(It help for run the application)

$ sudo apt-get update

$ sudo apt-get install screen

Install mongoDB

$ sudo apt-get update

Step-1 :  Import the public key used by the package management system.

$ sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv EA312927


Step-2 :  Create a list file for MongoDB

$ echo “deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list


Step-3 :  Reload local package database

$ sudo apt-get update


Step-4 :  Install the MongoDB packages

$ sudo apt-get install -y mongodb-org


Step-5 : Create folder data/db

$sudo mkdir data

$cd data

$ sudo mkdir db

Step-6 :  Start MongoDB

$ sudo service mongod start


Step-7 : Change PORT of MongoDB

1) Start a screen

$ sudo mongoddbpath=data/db –port=27018 —smallfiles


To Stop MongoDB

$ sudo service mongod stop


Restart MongoDB

$ sudo service mongod restart


Install forever

$sudo apt-get update

$sudo npm install forever -g

If (Forever Doesn’t Work)

{

 Command : sudo ln -s “$(which nodejs)” /usr/bin/node

}

Categories: Uncategorised

Leave a Reply

Your email address will not be published. Required fields are marked *

www.000webhost.com