Step 1 – general install
https://code.msdn.microsoft.com/Mongo-Database-setup-on-6963f46f
First, download Mongo DB msi file. Double click it and install it onto your machine. Look for the bin folder where all the executables are:
1. From the Desktop, right-click the very bottom left corner of the screen to get the Power User Task Menu.
2. From the Power User Task Menu, click System.
3. Click the “Advanced System Settings” link in the left column.
4. In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab.
5. In the Environment Variables window (pictured below), highlight the Path variable in the System variables section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each different directory is separated with a semicolon as shown below.
Now open up a GitBash and check to see if the system recognizes your mongo installation:
mongo –version
You should then see output of the mongo installation.
Now open command-prompt (administrator) and run the following command to start mongo server
mongod
You’ll see it start up and then checks for
Open another command-prompt (don’t close 1st prompt) and run client command:
mongo
You’ll see an error that says it can’t find a particular directory that it wants to store data/logs to.
Simply create that directory and mongod again.
Then you’ll see it start up.
Optional – doing a manual run of mongod on a custom path
This basically makes mongod save all data and logs onto a custom path that you like
In order to do this, open up a command prompt and type the command like so:
C:\Users\YOUR USER NAME>mongod –dbpath the location where you want to create the database for example
> mongod –dbpath “c:\Users\your user name\Products\Mongo\database
However, if you want to do it the default way:
http://stackoverflow.com/questions/9647561/how-to-connect-to-mongodb-in-windows/31586020#31586020
Create default db folder.
mkdir c:\data\log
mkdir c:\data\db
to create both folders in your c drive.
Create config file in bin folder of mongo (or you may in save your desired destination)
Use following commands in command-prompt:
echo dbpath=c:\data\db>> “mongod.cfg”
echo logpath=c:\data\log\mongo.log>> “mongod.cfg”
This adds following in text file named “mongod” and save it as
mongod.cfg
dbpath=c:\data\db
logpath=c:\data\log\mongo.log