MongoDB : Setup

First Download the mongodb  using these commands

$ curl http://downloads.mongodb.org/linux/mongodb-linux-i686-1.6.4.tgz > 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:

./mongodb-xxxxxxx/bin/mongod
 
To install MongoDB shell.


sudo apt-get install mongodb
 

Comments

Post a Comment

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Difference between Validations, Callbacks and Observers