Installing MongoDB under Windows

Source: Internet
Author: User
Tags mongodb

Installation Tutorial Source: Https://jingyan.baidu.com/album/d5c4b52bef7268da560dc5f8.html?picindex=1

First step: Download the installation package and add the path

MongoDB website website

MongoDB easy to be wall, if not download, please point mongodb-win32-x86_64-2008plus-ssl-3.4.1-signed.msi network password: sj5m

Select the custom installation path and then install it. Here I choose to install in

The path to the bin in the folder is then added to the system path.

Step Two: Create the database file storage address
    1. Create a database file storage address, such as d:/mongodb/data/db, that is, a new data folder, and then create a new DB folder inside
    2. Create log file storage directory: D:\Development_Tools\MongoDB\data\log\mongodb.log
    3. Create a blank log file: D:\Development_Tools\MongoDB\mongodb.config

2.3 Are created text documents, 3 is saved as config file type

Open Mongo.config input with Notepad:

Dbpath=d:\mongodb\data\db

Logpath=d:\mongodb\data\log\mongo.log

Step three: Start the MongoDB service

Open the CMD window and switch to the bin directory:

First Enter D: Enter the D drive and enter the CD D:\mongodb\bin

Enter the following command to start the MongoDB service:

D:/mongodb/bin>mongod--dbpath D:\mongodb\data\db

Open Browser, Address bar input: http://localhost:2701

If the following appears, it indicates that the success has started:

Fourth step: Add MongoDB to the Windows service

Open the cmd command line as an administrator , enter the D:\mongodb\bin directory, and enter the following command:

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

This creates a service called MongoDB and looks at the system service, which indicates that a success has been created:

After that, you can start MongoDB by starting the service.

Installing MongoDB under Windows

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.