MongoDB Configuration Windows service startup

Source: Internet
Author: User

First step to download MongoDB

Http://www.mongodb.org/downloads

Step Two

Extracted to the D:\mongodb\ directory, for the convenience of the command line, you can add the D:\mongodb\bin to the system environment variable path.

Step Three

Create D:\mongodb\data\db and D:\mongodb\logs\mongodb.log

Fourth step to start MongoDB

Command Prompt D:\mongodb\bin>mongod.exe--dbpath=d:\mongodb\data

Fifth step to install Windows services

Every time D:\mongodb\bin>mongod.exe--dbpath=d:\mongodb\data this way to start MongoDB is too much trouble, the installation of Windows Services is much easier.

Command Prompt D:\mongodb\bin>mongod.exe--logpath d:\mongodb\logs\mongodb.log--logappend

--dbpath d:\mongodb\data\db--directoryperdb--servicename MongoDB--install

The command line specifies the log file: D:\mongodb\logs\mongodb.log, and the log is output in Append mode.

Data file directory: D:\MONGODB\DATA\DB, and the parameter--directoryperdb indicates that each DB will create a new directory.

Name of the Windows service: MongoDB.

The above three parameters can be determined according to their own circumstances, you can see more parameters through the Mongod--help.

Finally, the installation parameters:--install, the opposite is the--remove.

Start mongodb:net start MongoDB, stop mongodb:net stop MongoDB

Delete Service Command: SC Delete Service name

The above content from blogger: min Fly blog, Link: http://www.cnblogs.com/EricaMIN1987_IT/p/3571773.html

MongoDB Configuration 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.