Installing MongoDB in the Windows environment

Source: Internet
Author: User
Tags mongodb

MongoDB, one of the hottest NoSQL, has now been widely stored in data. This article describes how to perform a standalone installation under Windows.

Environment :
Windows Server 2016 (other versions also apply)
MongoDB 3.6.5

Download :
MongoDB Official Download:
Https://www.mongodb.com/download-center#community

installation :
After the download is complete, you get the following MSI

Double-click Install, always select Next until the installation is complete

Start MongoDB

    • Set the data store path and log path, where you can choose to store it under the C drive, or choose to place it in a different directory
C:\>mkdir dataC:\>cd dataC:\data>mkdir dbC:\data>mkdir dbconf
    • You build the Windows service, and you apply MongoDB to the Windows service to start the database. Start the cmd command line as an administrator and switch to the Bin subfolder under the folder where the MongoDB database driver is located

Execute the following command:

mongod.exe --bind_ip 127.0.0.1 --logpath "C:\data\dbconf" --logappend --dbpath "C:\data\db" --port 27017 --serviceName "MongoDB" --serviceDisplayName "MongoDB" --install

The command includes many subcommands, each of which requires the following parameters to be written:

"--BIND_IP": the IP address of the binding, subsequent connections to this MongoDB from other records

"--logpath": Log file storage path

"--dbpath": Data storage Road;

"--port": The database occupies the port, the default is 27017;

"--servicename": Windows service Name, set to MongoDB;

"Servicedisplayname": The Windows Runtime service name, where MongoDB is the example.

    • Check that the Windows service is created successfully, run inside input services.msc, look for the MongoDB service generated above in the Popup Services window, and check if the service is running. As follows:

Installing MongoDB in the Windows environment

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.