MongoDB Download, install, configure and use

Source: Internet
Author: User
Tags mongodb download mongodb compass

Thank you: 77776706

First, Download:

Website address: https://www.mongodb.com/download-center?jmp=nav#community

Second, installation:

After selecting a custom installation path, the next step is to uncheck the MongoDB Compass by default and cancel it. Check will make the whole installation process very slow, can be downloaded separately on the official website.

Third, the use

1. Create the following three paths: Database path (data directory), log path (logs directory), and log file (Mongo.log file)

2, the configuration file mongo.conf, the contents are as follows:

#数据库路径  dbpath=d:\program files\mongodb\server\3.6\data  #日志输出文件路径  logpath=d:\program files\mongodb\ Server\3.6\logs\mongo.log  #错误日志采用追加模式  logappend=true  #启用日志文件, Journal=true is enabled by default  # This option can filter out some useless log information, if you need to debug use set to False  Quiet=true  #端口号 default is 27017  

3. Start MongoDB Service

Open the cmd window and go to the bin path under the MongoDB installation directory and execute Mongod--config "D:\Program files\mongodb\server\3.6\mongo.conf"

In the browser open http://127.0.0.1:27017/, and then you can see in the data and log directory, there are files generated.

4. Create and start MongoDB service

If it is troublesome to do this every time, follow the command below to create and start the MongoDB service, you can manage the startup and shutdown of MongoDB through the Windows service.

Mongod--config "D:\Program files\mongodb\server\3.6\mongo.conf"--install--servicename "MongoDB"

Start Service: Net start MongoDB

You can add it to an environment variable to execute the MONGO command

Test:

MongoDB Download, install, configure and use

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.