MongoDB installation configuration under Windows

Source: Internet
Author: User

MongoDB installed under Windows configuration 2012-08-17 09:48 lsc183 Blog ParkI want to comment (0) font size:T | T

Here is a list of MongoDB installation configurations under Windows, including how to unzip, set up a working directory, set up system variables, and more.

AD:2014WOT Global Software Technology Summit Beijing Station course video release

Installation files: Official website http://www.mongodb.org/downloads

Select the file download for the corresponding system.

One, unzip the file.

Unzip the package, create a folder in the D disk MongoDB, copy all the. exe files in the package to the D:mongodb folder.

Second, establish the working directory.

1. Set up data storage directory D:\mongodb\data

2. Create log file D:\mongodb\log\mongodb.log

Third, set the system variables. To facilitate the management of MONGODB from the console, you do not have to go into the d:mongodb every time.

My Computer--attribute--advanced--environment variable--path in the system variable, plus; D:\MongoDB, note the semicolon in front. Such as:

Third, start the MONGDB service.

Go to the console and enter Mongod.exe--dbpath=d:\mongodb\data. Such as:

The service will start up and will normally appear as follows:

Enter http://localhost:27017/in the browser. will appear

You is trying to access MongoDB on the native driver port. For HTTP diagnostic access, add the port number

The surface service has been started.

Do not close the current console window, another console, enter MONGO. such as:

Indicates that the connection to Mongdb has been successful.

Iv. randomly start the mongdb as a Windows service.

Console input: Mongod.exe--dbpath=d:\mongodb\data--logpath=d:\mongodb\logs\mongodb.log--install

is normally displayed

V. Connect MongoDB

When you enter net start MongoDB in the console, a "Mongo DB service has started successfully" prompt appears.

When you enter MONGO, you connect to test. You can see that the MongoDB service has started successfully in my computer--management--services and applications

Vi. Exception Handling

If an error occurs:


First look at the service start No, if there is no start service first start the service, if the service has been started, it is possible that the last abnormal shutdown MONGO, causing the file to hold the data is occupied, locked. Simply remove the Mongod.lock file from the D:\MongoDB\data. Restart the service.

MongoDB installation configuration 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.