1. Purpose
The question is so simple that I think I should write an article for a long time, but for starters, anything that hasn't been touched is likely to be a stumbling block, so this blog is designed to keep track of the road, not the level.
2. Download
Baidu or Google search ' mongodb ' keyword, and then find and open the official dot click to open the link, click on the right to download MongoDB, until the end of this article, no 64-bit version of the Windows, So download the MSI installation package, whether you click 64-bit or 32-bit versions of Windows to download the 32-bit version. The other one is the URL of MongoDB native driver 1.x: Click to open the link
3. Installation
Run the installation package directly and install to the default path, which should be the C:\Program Files\mongodb 2.6 standard directory.
4. Direct start
Run the console, CD-to-C:\Program FILES\MONGODB 2.6 standard\bin Path, and then run the following:
>mongod--dbpath D:\MongoDB
Note that the following path should be all in English, preferably not Chinese characters
Run the shell command line if you want to start MongoDB
>mongo
5.bat Boot
Every time I enter a directory of C-drive to start MongoDB by running the console, it feels more troublesome, so we can write a startup script
As follows:
C \ "program Files" \ "MongoDB 2.6 standard" \bin\mongod--dbpath D:\MongoDB\data
Pause
It is important to note that the startup script can not space, if there are spaces in a directory, you need to include the "", pause is to prevent the console from automatically shutting down. And the paths here are absolute paths.
Also start MONGO Shell can write a bat file, as follows:
C \ "program Files" \ "MongoDB 2.6 standard" \bin\mongo
Pause
Installing MongoDB in Windows