How To Install MongoDB In Ubuntu 15.04 Easily

This brief tutorial is going to show you how to easily install MongoDB noSQL database server on Ubuntu 15.04. MongoDB is a free opensource NoSQL document database server used in modern web applications. Unlike like SQL servers where table’s schemas must be declared before inserting data into them, NoSQL works the other way around by not enforcing document structures.

For more information on MongoDB visit its website. There are tons of information about it out there. When you’re ready to install it in Ubuntu, continue below.

A stable version of MongoDB packages are already in the default Ubuntu repository. However, the version in Ubuntu’s repository isn’t the latest. If you want to install the latest version you must add a third-party repository to your system and install it from there.

To do that, run the commands to add the repository’s key to your system. Without this key, you won’t be able to install packages from the repository.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

Next, run the commands below to add the repository to your machine

sudo echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

After that, update your system and refresh existing repositories by running the commands below.

sudo apt-get update

Running the above commands tells Ubuntu to go and fetch for updated and newer packages from installed repositories. This also refreshes the repositories by downloading updated version of packages and scripts.

Finally, run the commands below to install MongoDB server in Ubuntu

sudo apt-get install mongodb-org

To verify it is successfully installed, run the commands below to view its running status.

sudo systemctl status mongd

That’s it! This is how you install the latest version of MongoDB to Ubuntu. Below are some of the items that were recently released and updated.

  • Fix missed writes with concurrent inserts during chunk migration from shards with WiredTiger primaries: SERVER-18822
  • Resolve write conflicts with multi-update updates with upsert=true with the Wired Tiger Storage engine: SERVER-18213
  • Fix case where secondary reads could block replication: SERVER-18190
  • Improve performance on Windows with WiredTiger and documents larger than 16kb: SERVER-18079
  • Fix issue where WiredTiger data files are not correctly recovered following unexpected system restarts: SERVER-18316

Enjoy!

Leave a Reply

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