MongoDB Installation

In previous section, we have understood about the bin shell components of MonoDB which are mongo and mongod. Now we will discuss about the MongoDB installation in out system.

The MongoDB Installation is very very easy. For this you need to follow below steps.

Step-1:

Download the Mongo DB software from the MongoDB website by clicking this link

http://www.mongodb.org

Step-2:

Extract this zip file to (/optional folder/mongo db/).

Create a data folder to (/optional folder/mongo_data/db).

This is the file where all the data files are stored. Suppose we have a collection the data of the collections are stored inside the data folder.

Step-3:

Open your command prompt as run as administrator and go to the bin folder of Mongo Db. Then run the command “mongod” which is used to run the Mongo DB server. If the following instruction will come then this is confirmed that Mongo DB server is started otherwise check for continue from the initial step.

Step-4:

After starting the Mongo DB server this is showing that waiting for connection to be connected to the server. To connect to the server run the mongo shell, which is reside in the bin folder of mongodb, in another command prompt and notice the server command prompt. There is written in server that connection is accepted.

Mongo shell

Mongo DB server command prompt:

If the above instructions are coming then we will be confirmed that our mongo DB shell is ready for query.

Leave a Reply

Your email address will not be published. Required fields are marked *