Installation and configuration of MongoDB under Windows

Source: Internet
Author: User
Tags install mongodb

MongoDB is a non-relational database (NOSQL) that is currently very popular in the IT industry, and its flexible data storage methods are favored by current it practitioners. Here's how to install MongoDB under the Windows platform.

Tools/Materials
    • Mongodb-win32-x86_64-2008plus-2.6.7.zip
Method/Step
  1. Login to MongoDB official dot click on the right side of the download

  2. Select the Windows platform and click on the zip file you need to download (I am here to install the main complaint zip file)

    The legacy version can be used for installation under older versions of the system and is not recommended here.

  3. Unzip the zip file into the root directory of the drive letter (for example, C: or D:), in order to facilitate the suggestion folder naming as short as possible (D:\MONGODB)

  4. Create a storage location for the database file, 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.

  5. 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

  6. MongoDB Default connection port 27017, if so, can open http://localhost:27017 view (the author here is Chrome), found that the connection is successful, if not successful, you can see whether the port is occupied.

  7. In fact, MongoDB can be set to Windows services, this operation is for convenience, each time the boot MongoDB automatically started.

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

    Create a new file in D:\mongodb Mongo.config

  8. Open Mongo.config input with Notepad:

    Dbpath=d:\mongodb\data\db

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

  9. 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

    The results are stored in the log file, and viewing the log discovery has been successful. If it fails, it is possible that access is denied without administrator status.

  10. Open cmd Input services.msc view service can see MongoDB service, click can launch.

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.