1. Download Address: Http://www.mongodb.org/downloads (32-bit or 64-bit option). I downloaded: mongodb-win32-x86_64-2.4.5.zip
2, unzip the Mongodb-win32-x86_64-2.4.5.zip put to a certain location, decompression. I put it in the D:\dev directory. The path after decompression is D:\dev\mongodb-win32-x86_64-2.4.5
3. Install and prepare mongodb default data directory is: C:\data\db. If you do not use the default directory, you need to add the--dbpath parameter after the Mongod.exe command. Create a Data Catalog. I created the D:\dev\mongodb-win32-x86_64-2.4.5\data\db to create the log directory and its files. I created D:\dev\mongodb-win32-x86_64-2.4.5\log and D:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt.
4. Start mongodb Open cmd window (cmd.exe), enter D:\dev\mongodb-win32-x86_64-2.4.5\bin, execute Mongod.exe command, see. Mongod.exe--logpath=d:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt--dbpath=d:\dev\mongodb-win32-x86_64-2.4.5\ The data\db--logpath parameter is the path to the set log file. The--dbpath parameter is the set path for the database file. All parameter options for the Mongod.exe command can be viewed through Mongod.exe--help.
5. Install as a service use Administrator privileges to open the Windows CMD window and enter the D:\dev\mongodb-win32-x86_64-2.4.5\bin directory. Mongod.exe--install--logpath=d:\dev\mongodb-win32-x86_64-2.4.5\log\log.txt--dbpath=d:\dev\mongodb-win32-x86_ 64-2.4.5\data\db the--install parameter is set to set the server as a service, you can start or stop MongoDB in the same way as the cmd ( Windows cmd window with Administrator privileges open ) window. net start MongoDB start MongoDB service net stop MongoDB start MongoDB service
6, enter the shell environment interface into the sheelmongodb after the cmd window into the D:\dev\mongodb-win32-x86_64-2.4.5\bin directory, Enter Mongo.exe, you can enter the shell environment interface.
Windows7 installing MongoDB (RPM)