Install MongoDB for the first time in window8
Install mongodb on window8 for fun because of boredom.
All installed are the latest version: mongodb:mongodb-win32-x86_64-2.4.3
First, install mongodb first
① unzips the downloaded package to a directory
D:\ DB
② enter your directory from cmd
③ creates two folders, data and logs, under this directory
④ then goes to the bin directory and enter the command here: mongod-- dbpath=D:\ DB\ mongodb-win32-x86_64-2.4.3\ data
Do not close the dos window at this step
⑤ enter http://localhost:27017/ in the browser
If it appears
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number
Indicates that the installation was successful. The default port number for mongodb is 27017
⑥ and then type in the directory of mongodb
Mongod-- logpath D:\ DB\ mongodb-win32-x86_64-2.4.3\ logs\ MongoDB.log-- logappend-- dbpath D:\ DB\ mongodb-win32-x86_64-2.4.3\ data-- directoryperdb-serviceName MongoDB-- install
This step is to treat mongodb as a service
⑦ can then start mongodb using the net start MongoDB command