Firstly, download MongoDB setup from the MongoDB Web site or by clicking on the following link. You will get the option to choose Windows operating system 32 bits or 64 bits supportive setup. Unzip extracts to your preferred location.
Example: It is saved on my system location path: C:\Program Files\MongoDB,
Steps: Now, I’m going to install mongodb version MongoDB 3.0.7 setup of 64 bit in Windows 10.
- Double click on MongoDb Setup, and then click on Next option in setup wizard.
- Now check the License Agreement option.
- Select Complete option for full mongodb installation.
- Click on Install option:
- You can see installation processing on:
- Click on Finish button.
Now, after successful installation of MongoDB you will find that a folder named MondoDB has been created in your directory. You can find this folder here: C:\Program Files.
Steps to select the path of installation location or to verify that the setup installed location is correct:
Note: The above saved location path:
C:\Program Files\MongoDB\Server\3.0\bin
Now, go to
System Properties and press the
Environment Variables button to check and confirm correct setup location in your system.
Click on
Environment variables, then the below window will open. Here double click on the mongodb path to provide correct path in case it is wrong.
Paste our setup saved location path into if path is different.
In above path the mongodb setup location is correct.
Now go to
Run, then
Command Prompt:
Note: We need to create a default directory folder, where MongoDB will save all its data. For this open a command prompt and execute the following command.
Go to
Run and then type
cmd to open command prompt.
Type command:
Cd c: \ and then create a folder by
C:\ > md \ data\db
Now type
MongoDB command to start MongoDB server.
Test connection: Use command
mongo, to test connect the started MongoDB server.
Installation is complete.