Preparations:
Download the right version of http://www.mongodb.org/downloads to official
Here we use mongodb windows 32bit
Decompress mongodb to the d: \ mongodb \ directory, and create a new directory db (for storing data) and a directory logs (for storing logs) in the mongodb directory ), these files should be included in the mongodb directory ,:
Create a new mongodb. log file in the D: \ mongodb \ logs \ directory to record the Installation log. You are ready to start installation ~
Installation steps:
1. Start-run-cmd
2. cd D: \ mongodb \ bin \
3. D: \ mongodb \ bin> mongod-logpath D: \ mongodb \ logs \ mongodb. log-logappend-dbpath D: \ mongodb \ db-directoryperdb-serviceName MongoDB-install
:
If the installation is successful, the following text is displayed:
All output going to: D: \ mongodb \ logs \ MongoDB. log
Creating service MongoDB.
Service creation successful.
Service can be started from the command line via 'net start "MongoDB "'.
After the installation is successful, go to the windows Service and find the mongodb service to enable or execute the command net start MongoDB in cmd, so that the mongodb service starts. The default port of mongodb is 27017.
After the service is started, you can run a few simple commands to test it: