How to Install Mongodb on Ubuntu

Install Mongodb On Ubuntu

In this Article we will learn how to install mongodb on Ubuntu.If you want to install mongodb on other systems i.e fedora,redhat & centos please refer my last article.So lets start with install mongodb  Ubuntu systems.

What is Mongodb?

MongoDB is the leading NoSQL database, designed for how we build and run applications today.MongoDB empowers organizations to be agile and scalable. It helps them enable new types of applications, improve customer experience, accelerate time to market and reduce total cost of ownership (TCO). MongoDB is named from "huMONGOus" meaning "extremely large".
MongoDB is a general purpose, open-source database. MongoDB features:
  • Document data model with dynamic schemas
  • Full, flexible index support and rich queries
  • Auto-Sharding for horizontal scalability
  • Built-in replication for high availability
  • Text search
  • Advanced security
  • Aggregation Framework and MapReduce
  • Large media storage with GridFS 
After looking what is mongodb.let's gets started with installation of mongodb on Ubuntu..

Install Mongodb Ubuntu System

Ubuntu has its own Mongodb Packages but we will be using the offical Mongodb package available on the mongodb website as they are more up-to-date.

  • First Import the public key used by the package management system i.e. dpkg and apt which can be done with the following command.
     sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

  • Create the repo file or list file for the mongodb using the following command
     echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee                 /etc/apt/sources.list.d/mongodb.list

  • Now it's time to reload the database of package management which can be done with following command
            sudo apt-get update

  • Now it's Time to Install the Mongodb package which can be done 
             sudo apt-get install -y mongodb-org

   This will install the latest stable release of mongodb on ubuntu    if you want to install a specific release of mongodb on ubuntu,Please use the following command.
    
    sudo apt-get install -y mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1

The above command will install the mongodb version 2.6.1,you can replace the version number with your requirement.

If you have successfully executed all the above steps.You will be able to install mongodb on ubuntu.


author image

Written by

Experience running high-traffic web services, service configuration, monitoring,troubleshooting and change management.Expertise in Linux/Unix system administration, including configuration, troubleshooting, Python scripting language.

0 comments:

 

© 2013 Akhil's Blog. All rights resevered. Designed by Templateism

Back To Top