MongoDB Quick Start Learning Note 1 Windows installation MongoDB

Source: Internet
Author: User

1. Installing MongoDB
To download MongoDB from the MongoDB official website, the version I downloaded is 64-bit 3.2.6. After download, install directly, my installation directory is D:\work\MongoDB.


2. Configuring MONGODB Environment variables
Add D:\work\MongoDB\Server\3.2\bin in Path. (Configure environment variables for more convenient execution of commands under bin)


3. Start MongoDB
When you start MongoDB, use the Mongod command,--dbpath set the path to the database,--logpath set the path to the log file


More parameters using the command Mongod Help can be viewed.

Attachment 1: Setting Mongod parameters with a configuration file
Create a new file mongodb.conf under D:\work\MongoDB and write it in a file

DBPath == D:\work\MongoDB\log\mongodb.log

Using commands

Mongod-f D:\work\MongoDB\mongodb.conf


Attachment 2: Start MongoDB as a service

Mongod--dbpath "D:\work\MongodDB\data"--logpath "D:\work\MongoDB\log\mongodb.log"--install--servicename "MongoDB"

Start MongoDB service: net start MongoDB
Stop MongoDB service: net stop MongoDB

MongoDB Quick Start Learning Note 1 Windows installation MongoDB

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.