MongoDB

Install MongoDB on OS X

Posted on 17th June 2014

This chapter describes how to install MongoDB on a Mac OS X. MongoDB support OS X versions 10.6 (Snow Leopard) on Intel x86-64 and later.

1. Download

Download the latest version of MongoDB from the MongoDB Downloads Page.

2. Extract

Open a terminal window and go to the directory where you downloaded the archive. Extract the contects of the archive using tar command.

tar xvf mongodb-osx-x86_64-2.6.0.tgz

The contents are extracted to a newly created directory, in the above example it will be mongodb-osx-x86_64-2.6.0

3. Create Data Directory

Create directory /data/db which will hold all the data and set the permissions.

mkdir -p /data/db
chmod 777 /data/db

4. Start MongoDB

Change directory to location where you extracted the MongoDB files. Change to bin directory and run mongod

./mongod

This will start up MongoDB and it will be listening to client connections on port 27017 by default.

Post a comment

Comments

Nothing yet..be the first to share wisdom.