How to Install mongodb on windows
Mongo is an open Source noSql and document driven Database. MongoDb is written in C++ language.
Following are the stpes to install mongo on windows OS 32bit or 64bit
Goto this page for download http://www.mongodb.org/downloads
For 32 bit version of mongoDb click below link
For 64 bit version of mongoDb click below link
Steps to configure mongoDb on windows OS
mongodb is most compatible in C: drive , so for that create a folder called “mongodb” in your C: Drive.
Previously you have downloaded the mongodb, so just decompress that. After decompress of mongodb software, you will find the bin folder, so copy that BIN folder and paste in the c:mongodb folder.
So step is very simple i.e copy the bin folder to our own created mongodb folder inside c: drive.
Next step is to create a folder named “data” inside your c: drive. Then create another folder called “db” inside “data” folder.
Up to this step you have already created 2 folder in your c: drive i.e data and mongodb.
Now you have to do the path setting for the mongodb. you need to go to SYSTEM properties of your OS, so to do that
In Windows Xp or Older
Right Click on MyComputer -> goto Properties
In Windows Vista or 7 or 8
Right Click on MyComputer ->goto Properties-> from the left side of the window click on SYSTEM PROPERTIES
Then go to Advanced Tab -> Environment Variable -> inside this search for “PATH” and select path -> then click on EDIT.
As per discussion in the stpe-1 , your bin folder path of mongoDb should be C:mongodbbin , so you just need to add this path to PATH list in the Environment variable.
At last click on all open window OK button.
Here 2 things you have to do.
- 1st is to Start the mongoDb server. (console command is mongod)
- 2nd thing is to write query for the database manipulation. ( console command is mongo)
To archive above this , Open your Console or Command prompt.
start menu -> RUN -> cmd. Then press enter
Go to Bin folder by some console command
and type following command like follows
c:mongodbbinmongod.exe This command will start the mongoDb Server. By this time you must be created the data/db folder in your c: drive else it will create some problem in server start.
Now just minimize that console window and open another new console window.
In the new console command just mongo.exe like follows
Its all done. Your mongo is installed successfully in your system.