Configuring the MONGO service side
1. on official website: http://www.mongodb.org/ < Span style= "Font-size:12px;color:rgb (69,69,69); Font-family:verdana, Arial, Helvetica, sans-serif;line-height:18px; Background-color:rgb (255,255,255); " > Follow the operating system download the newest mongodb.
I download version:mongodb-win32-x86_64-2008plus-ssl-3.0.4-signed.msi.
2. Create a new MongoDB folder on the D disk (Install version 1 in the custom installation to directory D:\MongoDB).
3. Create a new logs folder within the MongoDB folder (for storing log file D:\MongoDB\logs) and create a new empty file Mongodb.log within this folder.
4. Create a new DB folder within the MongoDB folder (to hold the database file D:\MongoDB\db).
5. Start MongoDB.
Run cmd As system Administrator and switch to D:\MongoDB\bin directory input mongod.exe --dbpath=d:\mongodb\db. If you see the last line of the console similar to tue oct 09 11:50:55 [websvr] admin web console watiing The for connections on port 28017 description starts successfully (MongoDB occupies system 28017 port)
.
6. Test MongoDB
To create a new CMD window as an administrator, enter the bin directory of MongoDB into MONGO, as shown in the Connecting to:test instructions test pass.
Continue testing:
(1). Enter Use test carriage return
(2). Enter Db.foo.save ({hello:1, baie:2}) Carriage return
(3). Enter Db.foo.find () carriage return
If there is a similar { "_id" : objectid ("5073a0a090f93be1455461d2"), "Hello" : 1, "Baie" &NBSP;:&NBSP;2&NBSP, indicating that the test success data has been inserted into the database and entered exit.
7. Register MongoDB as a system service (this step must run CMD as system administrator, otherwise an error will be made)
Run the cmd input as a system administrator and switch to the bin directory of MongoDB to run the following statement
Mongod.exe--dbpath=d:\mongodb\db--logpath=d:\mongodb\logs\mongodb.log--install--servicename "MongoDB"
Enter
If the console appears similar to the Tue Oct 12:05:15 Service can be started in the command line with ' net start MongoDB ' statement, the service has been registered successfully.
8. Enter the net start MongoDB in cmd to start the MongoDB database service, when the console output MONGO DB service has started successfully, indicating that the system started successfully.
9. If a system error occurs 1067 Please remove the Mongod.lock file from the DB directory and re-enter the net start MongoDB service.
MongoDB installation for Windows7 64-bit