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