"MongoDB Tutorial First Lesson Add Class 1" Windows7 under Install MongoDB turn off service

Source: Internet
Author: User
Tags create mongodb install mongodb mongodb tutorial

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\datalogpath= 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.