MongoDB is one of the leading NoSQL databases commonly used in modern web applications. This tutorial will walk you through setting up MongoDB. Please note that this tutorial is meant for Ubuntu 14.04, but it should also work on other Ubuntu distributions. These steps have not been tested on Linux distros other than Ubuntu.
You will want to make sure that your server is up-to-date. If you are setting up your VPS for the first time, it should already be up-to-date. However, if you are running a Custom ISO or installing it on an existing VPSThen you can run the following command to do a system update:
apt-get update
apt-get dist-upgradeOnce this is complete, you will be ready to move on to the next step.
There are a few ways to install MongoDB. In this tutorial, we will be installing it using the following command:
apt-get install -y mongodbThis will take a moment to install. Once it has finished installing, you can then test that MongoDB is operational by typing Mongo into your command line. If everything works, you will see:
MongoDB shell version: 2.4.X
connecting to: ******
>You can also verify that MongoDB is running by typing the following:
ps aux | grep mongodbWhich should give you something similar to:
mongodb 1112 0.5 0.1 514376 13692 ? Ssl Sep27 19:49 /usr/bin/mongod --config /etc/mongod.confIf you see that you have successfully installed and are ready to use MongoDB on your AKLWEB HOST VPS.
Enjoy!