MongoDB installation and start-up

Source: Internet
Author: User
Tags install mongodb

    1. Install MongoDB. : Http://www.mongodb.org/downloads
    2. Select the MSI file or ZIP package, install it in your own directory, I installed the F:\mongodb
    3. Create Folders f:\mongodb\data\db, F:\mongodb\data\log, respectively, to install the DB and log files, create a log file under the log folder MongoDB.log, that is, f:\mongodb\data\log\ MongoDB.log
    4. Run cmd.exe into the command line window and execute the command:
      >CD F:\mongodb\bin
      >f:\mongodb\bin>mongond-dbpath "F:\mongodb\data\db"

      If you see waiting for connections on port 27017, it indicates that the service started successfully.
    5. Test connection
      Open a new CMD window and enter the command:
      >CD F:\mongodb\bin
      >f:\mongodb\bin>mongo

      If you see a similar window, the test is successful.
    6. Making a startup item
      First explain the Mongod.exe and Mongo.exe, in the MongoDB Bin folder there are two EXE programs, respectively, the server and the client. You can run Mongo.exe only if you start Mongob.exe first.
      To avoid entering Mongond-dbpath "f:\mongodb\data\db" in cmd, you can make a startup bat file. Method: Create a new mongod.txt file, rename it to Mongod.bat, open it with the editor, enter it in

      Save, so that every time you double-click the Mongod.bat file, the MongoDB service is started.

MongoDB installation and start-up

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.