Installation and configuration of MongoDB under Windows

Source: Internet
Author: User
Tags robomongo

1, first download the corresponding version of MongoDB for installation, I chose the D packing directory to install, in order to facilitate the suggestion folder name as short as possible (D:\MONGODB)

2. Create a storage location for the database files, such as d:/mongodb/data/db. You must create a storage folder for the database files before you start the MongoDB service, otherwise the command will not be created automatically and cannot start successfully.

3, open cmd (Windows key +r input cmd) command line, enter the D:\mongodb\bin directory (first enter D: Enter D and then enter the CD D:\mongodb\bin),

Enter the following command to start the MongoDB service:

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

4,mongodb Default connection Port 27017, if present, you can open the http://localhost:27017

5, in order to more convenient use of MongoDB, I add him to the Windows service, this operation is for convenience, each time the power on MongoDB automatically started.

Create a new folder log (log file) under D:\mongodb\data and create a new file Mongodb.log d:\mongodb new file Mongo.config

6. Open Mongo.config input with Notepad:

Dbpath=d:\mongodb\data\db

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

7, open the cmd command line as Administrator , enter the D:\mongodb\bin directory, enter the following command:

Mongod--config D:\mongodb\mongo.config--install--servicename "MongoDB"

8,sqlserver has corresponding visualization tools MongoDB also has, I use is Robomongo. Create a GUI folder under the MongoDB folder and install the Robomongo software into the directory

Installation and configuration of 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.