How to make MongoDB a Windows service startup

Source: Internet
Author: User

The recent project to use MongoDB, each boot to the cmd inside the command, very troublesome. Although these commands can be written in the bat script, the window is easily turned off, causing the service to stop. So the safest way is to register it as a service.

A lot of methods have been looked up from the internet, but there are all kinds of problems,

Some blogs write like this.

& nbsp   E:\apmserv5.2.6\mongodb\bin>mongod--logpath E:\APMServ5.2.6\MongoDb\logs\MongoDB.log--logappend-- DBPath E:\APMServ5.2.6\MongoDb\data--directoryperdb--servicename MongoDb--install
    
    carriage return shown below is the successful installation of the service
     all output going to:e:\apmserv5.2.6\mongodb\logs\mongodb.log
    creating service MongoDB.
    service creation successful.
    service can started from the command line via ' net start ' MongoDB '.

But I have never succeeded, so with the command to open can show the success of the Open, can also show the success of the shutdown, open Service Manager can also see the successful start, but is not available, MONGO total display cannot connect.

Finally found a way to publish on the official website: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

However, to publish the blog, there is still a problem, that is, when the closure will be reported a 109 error, the network is said to be a configuration problem, but has not found a specific reason.

We now need to use MONGO to manage some of the audio and video and pictures and other files, but do not know how to save the law, is directly stored files or path, to pass the Great God to a demo or ideas Ah, grateful!


How to make MongoDB a Windows service startup

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.