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!
Frequently Asked Questions
How to install MongoDB on Ubuntu 15.04?
To install MongoDB on Ubuntu 15.04, you need to add a third-party repository to your system as the version in the default repository is not the latest. Follow the commands provided in the article to add the necessary repository and install MongoDB.
What is MongoDB and its use in web applications?
MongoDB is a free opensource NoSQL document database server commonly used in modern web applications. Unlike SQL servers, MongoDB does not enforce document structures, making it flexible for storing unstructured data.
Why should I use MongoDB over SQL servers?
MongoDB offers flexibility in storing unstructured data compared to SQL servers where table schemas need to be defined before data insertion. It is particularly useful for applications requiring dynamic and evolving data structures.
How to verify MongoDB installation in Ubuntu?
To verify the successful installation of MongoDB in Ubuntu, run the command 'sudo systemctl status mongd' to check the running status of the MongoDB server.
Can I install the latest version of MongoDB in Ubuntu without adding a third-party repository?
No, to install the latest version of MongoDB in Ubuntu, you must add a third-party repository to your system as the default Ubuntu repository does not contain the latest version of MongoDB packages.
Is MongoDB suitable for modern web applications?
Yes, MongoDB is suitable for modern web applications due to its flexibility in managing unstructured data, making it ideal for applications with dynamic data requirements.
What are the steps to update MongoDB in Ubuntu?
To update MongoDB in Ubuntu, you need to first add the repository key and repository to your system, then update the system and install the latest MongoDB package using the appropriate commands.
Where can I find more information about MongoDB installation in Ubuntu?
For more detailed information on installing MongoDB in Ubuntu, you can visit the official MongoDB website or refer to online tutorials and documentation available on the web.