Windows under MongoDB installation

Source: Internet
Author: User

Starting with version 2.2, MongoDB does not support Windows XP. Use recent versions of Windows to use the latest version of MongoDB.

Download Page http://www.mongodb.org/downloads

Run the file directory on D:\mongodb

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

    1. Open cmd command line, go to D:\mongodb\bin directory

      Enter the following command to start the MongoDB service:

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

       
    2.  

      MongoDB default connection Port 27017, if it occurs, you can open http://localhost:27017 view, found that the connection is successful, if not successful, you can see whether the port is occupied.

         can actually set MongoDB as a Windows service, this operation is for convenience, each time the power on MongoDB automatically started.   

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

      New file in D:\mongodb mongo.config

       

      Open mongo.config input with Notepad:

      dbpath=d:\mongodb\data\db

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

       

      Open the cmd command line with Administrator , enter the D:\mongodb\bin directory, and enter the following command:

      Mongod.exe-- Install--config D:\mongodb\mongo.config

       

      is set to service after CMD ( Administrator permissions Open the Windows CMD window ) window to start or stop MongoDB in a service way.
      net start MongoDB start MongoDB service
      net stop MongoDB start MongoDB service

       

Under-Windows MongoDB installation

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.