Installing MongoDB x86_64

Source: Internet
Author: User
Tags install mongodb install mongodb windows mongodb client mongodb version mongodb windows

1. Download MongoDB

Download MongoDB version of Windows, there are 32-bit and 64-bit editions, download according to system conditions: http://www.mongodb.org/downloads

2. Installing MongoDB

Install to D:\Program files\

3. Database file directory

Specifies where the database file is stored 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. The default folder path is C: \data\db, and when you use the System default folder path, the startup service does not need to add--dbpath parameter descriptions, but folders are also created manually.

4. Set the database file path

Open the cmd command line, enter the D:\Program files\mongodb 2.6 standard\bin directory, enter the following command to start the MongoDB service:

Mongod.exe--dbpath D:\mongodb\data\db

Indicates a successful start, the last two lines of the database port and the Web port, the default is 27017 and 28017, in the browser open http://localhost:28017, you can see some information about it.

5. Resetting the database port

You can modify the database port by adding the parameter--port:

D:\Program files\mongodb 2.6 standard\bin>mongod.exe--port 10001--dbpath D:\mongodb\data\db

6. Test MongoDB

by double-clicking Mongo.exe in the Bin directory of the MONGDB installation directory, you can perform MONGODB client command operations.

7. MongoDB is set to Windows service

Every time you start MongoDB is inconvenient, you can use it as a Windows service, so it is much easier.
To install MongoDB Windows services by creating the logs directory under the MongoDB installation directory, and then the cmd command line into the bin directory of the MongoDB installation directory, enter the command:
Mongod--logpath d:\ Program Files\mongodb 2.6 standard\logs\mongodb.log--logappend--dbpath D:\ Mongodb\data\db --directoryperdb--servicename MongoDB--install

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.