Home / Tutorials / How To Install MongoDB on Ubuntu

How To Install MongoDB on Ubuntu

What is MongoDb ?

MongoDB is a free and open-source NoSQL document database used commonly in modern web applications. This tutorial will help you set up MongoDB on your server for a production application environment.

How to Install MongoDb ?

Prerequisites

To follow this tutorial, you will need:

Step 1 — Importing the Public Key

In this step, we will import the MongoDB GPG public key.

MongoDB is already included in Ubuntu package repositories, but the official MongoDB repository provides most up-to-date version and is the recommended way of installing the software. Ubuntu ensures the authenticity of software packages by verifying that they are signed with GPG keys, so we first have to import they key for the official MongoDB repository.

To do so, execute:

After successfully importing the key you will see:

Step 2 — Creating a List File

Next, we have to add the MongoDB repository details so APT will know where to download the packages from.

Issue the following command to create a list file for MongoDB.

After adding the repository details, we need to update the packages list.

Step 3 — Installing and Verifying MongoDB

Now we can install the MongoDB package itself.

This command will install several packages containing latest stable version of MongoDB along with helpful management tools for the MongoDB server.

After package installation MongoDB will be automatically started. You can check this by running the following command.

If MongoDB is running, you’ll see an output like this (with a different process ID).

You can also stop, start, and restart MongoDB using the service command (e.g. service mongod stop, service mongod start).

About cmadmin

Web Developer & Designer | Android App Developer

Check Also

How to Install Oracle Java 8 on Ubuntu

Pre-Flight Check These instructions are intended specifically for installing Oracle Java 8 on Ubuntu 14.04 …

How to set up an FTP server on Ubuntu

Setting up a fully-functional and highly secure FTP server on Ubuntu is made very easy …

Leave a Reply

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

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
%d bloggers like this:
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH