Skip to content

Instantly share code, notes, and snippets.

@vigneshncc
Last active June 23, 2016 18:55
Show Gist options
  • Save vigneshncc/30c3301337a1d41ecf223be1024e9c66 to your computer and use it in GitHub Desktop.
Save vigneshncc/30c3301337a1d41ecf223be1024e9c66 to your computer and use it in GitHub Desktop.
Installing Stable Version of Mongo DB in Ubuntu
Installing Latest Stable version of Mongo DB in Ubuntu 14.04
============================================================
# Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
# Create a list file for mongo db (Ubuntu 14.04)
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
# Reload local database
sudo apt-get update
# Install the latest stable version of mongo db
sudo apt-get install -y mongodb-org
Start, Stop and Restart
=======================
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
# Verify that MongoDB has started successfully
Verify that the mongod process has started successfully by checking the contents of the log file at
/var/log/mongodb/mongod.log for a line reading.
[initandlisten] waiting for connections on port <port>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment