Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Installing mongodb on ubuntu

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 314
    Comment on it

    Install mongodb on ubuntu

    Hi friends,
    Today I am going to give you a step-by-step guide of how to install mongodb on ubuntu server. The steps are:

    1. First we need to import the mongodb public GPG key to verify the authenticity of distributor for ubuntu package manager
    2.         sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10
              #output would be something like
              gpg: requesting key 7F0CEB10 from hkp server
              gpg: key 7F0CEB10: public key "Richard Kreuter " imported
              gpg: Total number processed: 1
              gpg:               imported: 1  (RSA: 1)
    3. Now we will create a list file for mongodb by using the following command.
    4.         echo "deb trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
              deb trusty/mongodb-org/3.0 multiverse
    5. In this step we will reload the local packages on ubuntu:
    6.     sudo apt-get update
    7. Once we reached here, we will hit the final command to install the mongodb
    8.     sudo apt-get install -y mongodb-org
          #To install a specific version you can mention the version
          sudo apt-get install -y mongodb-org=3.0.7 mongodb-org-server=3.0.7 mongodb-org-shell=3.0.7 mongodb-org-mongos=3.0.7 mongodb-org-tools=3.0.7
    9. Thus mongodb installation is complete. You can check it by simply writing mongo and hitting it. you will be connected to the mongo shell. You can also check the version by:
    10.     mongo --version 
          MongoDB shell version: 3.0.7

    Hope you liked this blog and it proved helpful for you. To check more like this please click here.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: