In the This blog, I'll mainly attach great importantance to "create a Windows service for MongoDB." The method described in the next are referred from the official website of MongoDB.
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
- First of all, create the folder and files this need to store db and log. If you forgot, you could view the above the blog. In my local machine,
- Create a configuration file
Create a configuration file, this file can include any of the configuration options for Mongod, but must include a valid setting for LogPath. We can learn from the next picture of that echo command Promart.
- Create the MongoDB service. Use the following command. and use command ' net start MongoDB ' to start the service.
In the meantime, we could use anther-to-start service.
- Use the command {net stop MongoDB} to stop this server or in the above service window.
"MongoDB" Configure a Windows Service for MongoDB