Installing Latest MongoDB version on Ubuntu 14.04 LTS 15.04

How to Install MongoDB on Ubuntu 14.04 and 15.04

As we all know that MongoDB is becoming a default choice for certain part of community and is also emphasized as M in MEAN stack. Its an open source NoSQL database that is available free of cost and that you can make use of. In this article I will show you to quickly utilize official MongoDB repository to get and install most recent version of MongoDB.



You will need a running Ubuntu 14.04 server and a sudo non-root user, A great article on setting up such account can be found here

What you need to do

By default, MongoDB package is included in official Ubuntu package repositories, but this does not guarantee that its the latest version, so a better and recommended way to install MongoDB is to Import the MongoDB public GPG key used by the package management system.

Once you are done with above command you will see something like this



Let’s add Mongo repository details to APT, this is required so you have apt  remember where to find MongoDB the next time you want to update it.

Use the commands below

Let’s now update the package list by using the command below



We install MongoDB by issuing the command below

When installation finish,  you now have a MongoDB server, Mongo shell, and other Mongo tools such as mongoimport, mongodump etc

You can now verify if MongoDB server s running by issuing the following command

Helpful commands

  1. Stops mongo
    sudo service mongod stop
  2. Start mongo
    sudo service mongod start
  3. Restart mongo
    sudo service mongod restart

You can read more on official Mongo docs website

I hope this helps



  1. A workaround can be found here

  2. Running an Ubuntu server 15.04 in a VM, the apt-get update command can’t find the repositories:

    W: Failed to fetch 404 Not Found

    W: Failed to fetch 404 Not Found

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.