First step to download MongoDB
Http://www.mongodb.org/downloads
Step Two
Extracted to the D:\mongodb\ directory, for the convenience of the command line, you can add the D:\mongodb\bin to the system environment variable path.
Step Three
Create D:\mongodb\data\db and D:\mongodb\logs\mongodb.log
Fourth step to start MongoDB
Command Prompt D:\mongodb\bin>mongod.exe--dbpath=d:\mongodb\data
Fifth step to install Windows services
Every time D:\mongodb\bin>mongod.exe--dbpath=d:\mongodb\data this way to start MongoDB is too much trouble, the installation of Windows Services is much easier.
Command Prompt D:\mongodb\bin>mongod.exe--logpath d:\mongodb\logs\mongodb.log--logappend
--dbpath d:\mongodb\data\db--directoryperdb--servicename MongoDB--install
The command line specifies the log file: D:\mongodb\logs\mongodb.log, and the log is output in Append mode.
Data file directory: D:\MONGODB\DATA\DB, and the parameter--directoryperdb indicates that each DB will create a new directory.
Name of the Windows service: MongoDB.
The above three parameters can be determined according to their own circumstances, you can see more parameters through the Mongod--help.
Finally, the installation parameters:--install, the opposite is the--remove.
Start mongodb:net start MongoDB, stop mongodb:net stop MongoDB
Delete Service Command: SC Delete Service name
The above content from blogger: min Fly blog, Link: http://www.cnblogs.com/EricaMIN1987_IT/p/3571773.html
MongoDB Configuration Windows service startup