MongoDB : Setup

First Download the mongodb  using these commands

$ curl > mongo.tgz
$ tar xzf mongo.tgz

By default MongoDB will store data in /data/db, but it won't automatically create that directory. To create it, do:

$ sudo mkdir -p /data/db/
$ sudo chown `id -u` /data/db

You can also tell MongoDB to use a different data directory, with the --dbpath option.

First, start the MongoDB server in one terminal:

To install MongoDB shell.

sudo apt-get install mongodb


Post a Comment

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Remove duplicates from a JavaScript Array

Difference between Validations, Callbacks and Observers