The installation of MongoDB

Source: Internet
Author: User
Tags create mongodb

NoSQL is very red now, so take MongoDB to experience a piece. Write down the essays for later use.

The entire installation process is based on the description of the official web site and is built on the Windows platform. The result was successful, not like some online posts said, and finally unable to start the services normally.

The official steps refer to the link:http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

Here is your own installation process:

    1. Download MongoDB

Download Link:http://www.mongodb.org/downloads Find the version you want. Here's an example of the Windows platform.

2. Run the MSI file

3. Run Mongod, test whether the operation is successful, you can refer to

  

Seeing waiting for connections on port 27017 indicates that the listener has started running. MongoDB is already working, of course 27017 is the default port and can be changed.

3. Create config file, mongod.cfg

In which you need to add logpath, such as: Logpath=c:\mongodb\log\mongo.log.

It should be noted here, try not to use a space in the log path, otherwise you need to enclose the path in double quotation marks, but in the future when the config file to Mongod, there will be a log file path spelling error, the reason is unknown.

Generated mongod.cfg can be tested with the following command:

When you see that the log generation is successful, the path is fine, and you can continue creating the service

4. Create a Windows service

Sc.exe create MongoDB binpath= "\" C:\MongoDB\bin\mongod.exe\ "--service--config=\" C:\MongoDB\mongod.cfg\ "" Displayname= "MongoDB 2.6 standard" start= "Auto"

5. Net start MongoDB running 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.