Windows installation MongoDB Service

Source: Internet
Author: User

1. Install the downloaded MongoDB on the E-drive E:\MongoDB

2. Go to the Bin directory to execute mongod--dbpath "E:\MongoDB\data" Enter, close the current CMD window

3. Create a new Logs folder in the MongoDB directory to store the log files

4. Create a new mongod.cfg configuration file in the MongoDB directory

The contents of the mongod.cfg are as follows

Logpath=e:\mongodb\logs\mongodb.log

Dbpath=e:\mongodb\data

5. Open the CMD window as an administrator, and go to the bin directory and execute the following command

Mongod--config "E:\MongoDB\mongodb.cfg"--install

6. Since the installation of this service is complete, use net start MongoDB in the cmd window to open the service net stop MongoDB shutdown service.

Windows installation MongoDB 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.