Tuesday 5 August 2014

Start with MongoDB

Ubuntu includes its own MongoDB packages.
Here are the few simple steps I followed to install mongodb on Ubuntu 14.

  1. Import the public key : The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key:  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
  2. Reload the local package database: sudo apt-get update
  3. Install latest version of mongodb : sudo apt-get install mongodb-org
  4. Issue the command to start mongod: sudo service mongod start
This was the basic installation of Mongodb on ubuntu. Will keep on posting as I explore ....

References

  1. http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ 

1 comment:

  1. The another simple way is as follows:
    1.Download the zipped package of mongodb from the website.
    2.Unzip the folder
    3. Create a data directory (Create a data directory and inside that create db directory)
    4.Go inside the mongodb folder cd Documents/MOngoDB/mongodb-linux-i686-2.6.3/bin
    5.Start mongod ./mongod --dbpath /home/surabhi/data
    6.Open a new terminal and from inside /mongodb-linux-i686-2.6.3/bin run ./mongo
    Start Working

    ReplyDelete