MongoDB installation and startup under Windows system

Source: Internet
Author: User
Tags install mongodb mongodb version

Version selection
MongoDB version naming specifications such as: x.y.z;

    • Y is an odd number to indicate that the current version is a development version, such as: 2.3.0, 2.1.1;
    • Y is even when the current version is stable version, such as: 2.0.1, 2.2.0;

Currently the latest version of the official website is 3.4.6
Platform Selection

    • Production environment using 32-bit machine data limit 2G, on 64-bit machine to use the 64-bit version, you can obtain a larger memory mapping space, improve the performance of MongoDB;
    • As for the operating system, MongoDB is cross-platform, in the download page to find their corresponding version can be.

Installation of the Windows platform

    • Download the corresponding version of the installation package to the MONGODB website: https://www.mongodb.com/download-center?jmp=nav#community
    • Set up the MongoDB folder in the D disk, set up the Data\db folder as the storage path of the data file under the MongoDB file, establish the logs folder to store the log file.
    • Install MongoDB under the D:\MongoDB path.

NEXT:

Here you need to change the installation path for the next MongoDB database, as shown in:

Installation is complete.

Start cmd in administrator mode, switch to MongoDB's installation directory, and execute the command: Mongod--dbpath "D:\mongodb\data\db"--logpath "D:\mongodb\logs\log.txt"-- Install-servicename "MongoDB"

About parameter Descriptions in commands

Parameter description
--BIND_IP bind service IP, if bind 127.0.0.1, then only native access, do not specify default local all IP
--logpath the MongoDB log file, note that the specified file is not a directory
--logappend writing the log using the Append method
--dbpath Specifying the database path
--port specifying the service port number, default port 27017
--servicename Specifying the service name
--SERVICEDISPLAYNAME Specifies the service name, which is executed when there are multiple MongoDB services.
--install is specified as a Windows service installation.

As shown in the following:

Next, start the MongoDB service as shown in:

After entering the MongoDB database shell:

To exit the MongoDB database shell:

MongoDB installation and startup under Windows system

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.