MongoDB does not support Windows XP at the beginning of version 2.2 (I think the use of XP should also be a part of the feelings of people, I just a craftsman only), Windows Server8 r2,64 bit, 32-bit, only 32-bit support database is less than 2GB.
① detection is how many bits of the system (method is not limited to this)
1 |
wmic os get osarchitecture |
② Download MongoDB
1 |
http: //www.mongodb.org/downloads |
③ Installing MongoDB
When installing, choose the path you installed, I chose D:\mongodb
④ Create a data path a log file
The data path I created here is: D:\testMongoDB\data
The log file path I created here is: D:\testMongoDB\log\mongo.log
⑤ Associated Data path
Create a data path under D:\mongodb\bin
Mongod.exe--dbpath D:\testMongoDB\data
Create a log path under D:\mongodb\bin
Mongod.exe--logpath D:\testMongoDB\log\mongo.log
⑥ can now use MongoDB, for a happy play (MongoDB 2.6.0), need to manually configure a Windows service for MongoDB, create a successful regret prompt: [SC] CreateService success
Before creating a service, you need to create a profile: mongod.cfg, the path I created is "D:\mongodb\mongod.cfg".
The content of Mongodb.cfg is (according to your actual situation):
12 |
dbpath= D:\testMongoDB\data logpath= D:\testMongoDB\log\mongo.log |
To create a MongoDB service:
Sc.exe create MongoDB binpath= "\" D:\mongodb\bin\mongod.exe\ "--service--config=\" D:\mongodb\mongod.cfg\ "" Displayname= "MongoDB" start= "Auto" start mongodb:net start MongoDB off mongodb:net stop monogodb remove Mongodb:sc.exe Delete Mongodb
Common error analysis ① check for path problems before checking for errors, whether the path corresponds to a file exists
②net Start MongoDB Service does not respond to control
Config path is correct, the corresponding. cfg file exists, and the path is correct, configure the error message can refer to the error log error message
③[SC] CreateService Failure 1072: The specified service was marked for deletion.
This error is caused by the unfamiliar creation of the window service, I opened the service window to view the service status before the service was deleted, and the window was re-created.
"MongoDB Tutorial First Lesson Add Class 1" Windows7 under Install MongoDB turn off service