MongoDB Install the MongoDB service

Source: Internet
Author: User
Tags scalar

When using MongoDB, the first thing to do is to run Mongod.exe to start the MONGO, so the command box prompt will appear, in order to avoid this situation. To start MONGO in the form of a service, the command box does not appear.

1. Open the Command box as an administrator

2. Create a Directory

mkdir C:\data\dbmkdir C:\data\log

3, C:\mongodb in the directory to establish the file mongod.cfg

The contents of the file are:systemlog: 
    Destinationpathc:\data\log\mongod.logstoragedbPathc:\data\db

4. Establishing MongoDB Service
Run command: "C:\Program files\mongodb\server\3.2\bin\mongod.exe"--config "C:\mongodb\mongod.cfg"--install

Enter

5. Start MongoDB Service

net start MongoDB

6. Close MongoDB Service

net stop MongoDB

MongoDB Install the 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.