How to install Mongodb.msi

Source: Internet
Author: User
Tags install mongodb

  1. To the MongoDB website to download MongoDB software: Mongodb-win32-x86_64-2008plus-ssl-3.0.2-signed.msi,

    Put it where you want it installed:

    such as: d:\MongoDB\

  2. 2

    Click to install: Mongodb-win32-x86_64-2008plus-ssl-3.0.2-signed.msi

  3. 3

    Agree to the agreement.

  4. 4

    Custom installation.

  5. 5

    Select Install in D:\MongoDB\

    Then select the Installed components

  6. 6

    Installation is complete.

  7. 7

    Create Folders d:\mongodb\data\db, D:\mongodb\data\log, respectively, to install the DB and log files, create a log file under the log folder MongoDB.log, that is, d:\mongodb\data\log\ MongoDB.log

  8. 8

    Run cmd.exe into the DOS command interface, execute the following command to start MongoDB

    > CD D:\mongodb\bin

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

    See the message that the start is successful, the default MongoDB listener port is 27017,mysql 3306

  9. 9

    Test connection

    Open a CMD window, enter the MongoDB bin directory, enter MONGO or Mongo.exe, the following message shows that the test passed, at this time we have entered the test database.

    Enter exit or CTRL + C to exit.

  10. 10

    When Mongod.exe is closed, Mongo.exe cannot connect to the database, so it is troublesome to open the Mongod.exe program every time you want to use the MongoDB database, so we can install MongoDB as a Windows service

    Or run cmd, go to the Bin folder and execute the following command

    > D:\mongodb\bin>mongod--dbpath "d:\mongodb\data\db"--logpath "D:\mongodb\data\log\MongoDB.log"--install-- ServiceName "MongoDB"

    Here MongoDB.log is the log file that was started,--servicename the "MongoDB" service named MongoDB

    Then start the MongoDB service

    > D:\mongodb\bin>net START MongoDB

  11. Shutting down services and deleting processes

    > D:\mongodb\bin>net Stop MongoDB (Close service)

    > D:\mongodb\bin>mongod--dbpath "d:\mongodb\data\db"--logpath "D:\mongodb\data\log\MongoDB.log"--remove-- ServiceName "MongoDB" (delete, note not--install)

How to install Mongodb.msi

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.