MongoDB is one of the leading NoSQL databases that is 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 work on other distributions of Ubuntu as well. These steps have not been tested on Linux distros other than Ubuntu.
Step 1: Update System
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 on an existing VPS, then you can run the following command to do a system update:
apt-get update
apt-get dist-upgrade
Once this is complete, you will be ready to move onto the next step.
Step 2: Install MongoDB using APT
There are a few ways to install MongoDB. In this tutorial, we will be installing it using the following command:
apt-get install -y mongodb
This 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 mongodb
Which should give you something similar to:
mongodb 1112 0.5 0.1 514376 13692 ? Ssl Sep27 19:49 /usr/bin/mongod --config /etc/mongod.conf
If you see that you have successfully installed and ready to use MongoDB on your AKLWEB Host VPS.
Enjoy!