Last active
May 26, 2017 11:14
-
-
Save sanjay1688/96318232b77fd1b296bf to your computer and use it in GitHub Desktop.
Setting Up Node Application On Aws Ubuntu Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############## UPDATE UBUNTU ############## | |
sudo local-gen UTF-8 | |
sudo apt-get update | |
sudo apt-get upgrade | |
############## INSTALL NODE UBUNTU ############## | |
Rerefence : https://github.com/nodesource/distributions | |
# Using Ubuntu | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
Now check for NodeJS and NPM versions | |
node --version | |
npm --version | |
############## GIT ############## | |
$ sudo add-apt-repository ppa:git-core/ppa | |
$ sudo apt-get update | |
$ sudo apt-get install git | |
############## INSTALL MONGO DB ############## | |
Refernces: | |
https://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu/ | |
https://dzone.com/articles/install-mean-stack-on-ubuntu-1510 | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
run as daemon | |
sudo mongod --config /etc/mongod.conf | |
sudo mkdir -p /data/db | |
sudo gedit /etc/mongod.conf | |
Replace dbpath=/var/lib/mongodb with dbpath=/data/db and then save the file. | |
sudo chown -R mongodb:mongodb /data/db | |
sudo status mongodb //tell status of mongodb start or stop | |
sudo service mongodb restart | stop | start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment