MongoDB Learning Notes

Source: Internet
Author: User
Tags mongodb commands mongodb server

1: Installation

Download the latest version from Https://www.mongodb.com/download-center?jmp=nav#community to local, and modify the installation path C:\MongoDB when installing.

After installation, there will be C:\MongoDB\bin directory, there are many EXE programs.

2: Make configuration file

C:\MongoDB\mongo.config

The contents are as follows:

Dbpath=c:\mongodb\data\db
Logpath=c:\mongodb\data\log\mongodb.log

3: Command line load configuration file and make system service

C:\mongodb\bin>mongod.exe--config C:\MongoDB\mongo.config--install--servicename "MongoDB"

4: Start or deactivate system services from the command line

C:\mongodb\bin>net Start MongoDB

C:\mongodb\bin>net Stop MongoDB

Summary: MongoDB does not need to be installed, only need to create the server's startup environment: The Bin folder is required (for some of the MongoDB commands), specify the location of the database and log location, create a log file. With this, the MongoDB server side can be started.

MongoDB Learning Notes

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.