Menu

Dipesh Majumdar

Blog and Paintings

How to install mongo db in linux

June 15, 2015

Download Mongodb Software  from http://www.mongodb.org/downloads

Extract mongodb at path - /xyz   (/xyz  path is just for example... One needs to choose path according to requirement/convenience)

tar zxvf mongodb-linux-x86_64-rhel62-3.0.3.tgz

The newly formed directory can be renamed to mongodb so we have the extracts from the software residing here - /xyz/mongodb/

Additionally create this directory:  mkdir -p /xyz/mongodb/data/db

Go to this path -  /xyz/mongodb/bin

./mongod --rest --httpinterface --dbpath /xyz/mongodb/data/db

....  as  a result - you should be able to see mongo db process running and you can access from browser

 

You can use a variety of combinations in the start command - for example - this can be used as well:

./mongod  --journal  --logappend --profile 2 --rest --httpinterface --dbpath /xyz/mongodb/data/db

Go Back

Comment