Tuesday, July 24, 2012

Install MongoDB on Linux

1. Download the binary and extract it

cd /opt/
sudo wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.6.tgz
sudo tar -xzf mongodb-linux-x86_64-2.0.6.tgz

2. Create a softlink to you're extracted mongodb content/folder

sudo ln -s mongodb-linux-x86_64-2.0.6 mongodb

3. Create soflinks for mongo binaries

cd /usr/bin
sudo ln -s /opt/mongodb/bin/mongod
sudo ln -s /opt/mongodb/bin/mongo

4. Generally MongoDB save you're database stuff into the directory. So we should create the directory if it doesn't exists

sudo mkdir /data
sudo mkdir /data/db

5. Start the MongoDB Server

sudo mongod

I hope these steps helpful to install MongoDB without any issues, If you have any issues let me know.


No comments:

Post a Comment