First download the corresponding version of the ZIP package from the MongoDB official website.
If you use Windows 64-bit r2+ or Win7 need to install hotfix patch. Readers can download the appropriate version online.
After extracting, you will get the following directory:
Then you build the good one directory on one of your recordings. My directory here is like this F:\MongoDB and then the last step of the extracted file contents are copied into F:\MongoDB this folder.
Then create a Mondodbdata folder on the corresponding disk. Here my path is this: F:\MongoDBDATA
Then find the bin directory under the F:\MongoDB path in the cmd window and execute Mongod.exe--dbpath F:\MongoDBDATA
In one is to configure the environment variable: the F:\MongoDB\bin path (the path is not the same as the reference to their own path on the line. After adding to the path of the environment variable (do not know how to set the environment variable?) right mouse button My computer à attribute à advanced system settings à environment variable)
The next step is to install the MongoDB database into a Windows service
First create a new mongod.cfg file in the F:\MongoDB directory with the following content
LogPath = F:\MongoDB\logs\MongoDB.log
DBPath = F:\MongoDBDATA
One is the log output file, one is the data storage file
Then execute the following command Mongod--config F:\MongoDB\mongod.cfg--install
Everyone's own path if it is not the same, refer to their own path and then my above command to break the line.
64-bit Win7 to install MongoDB in the form of a ZIP package (super verbose)