MongoDB Base MongoDB Installation

Source: Internet
Author: User
Tags install mongodb mongodb compass

Before installing MongoDB, first download MongoDB Software installation package, MongoDB Community Edition official website: https://www.mongodb.com/download-center?jmp=nav#community

After downloading, double-click the MSI installation file to install, click "Next" >>

Tick agree to the relevant agreement, click "Next" >>

Click "Custom"--"Browse" for custom directory installation, recommended to install in C:\MongoDB, click "Next" >>

Uncheck Install "Installed MongoDB Compass" (otherwise there will be no progress on the install Compass interface, causing the installation to fail), click "Next" >>

Click "Install" for installation >>

If the following interface appears, then congratulations, the installation was successful.

MongoDB installation difficulty is not the installation process, difficult to install MongoDB service, the following describes the installation of MongoDB services

Before installing the MongoDB service, create two folders in the MongoDB installation directory (C:\MongoDB), one for the Data folder (to store the database files), and the other for the log folder (to store the journal files)

Create a DB folder under the Data folder

Create a Mongo.log file under the log folder

Run cmd as Administrator, switch to the MongoDB installation directory Bin folder

Execute the following instructions to install the MongoDB boot service

C:\mongodb\bin>mongod.exe--dbpath c:\MongoDB\data\db--logpath=c:\mongodb\log\mongo.log--logappend--install-- ServiceName "MongoDB"

Do not hit the wrong female, enter, press ENTER to install

。。。 Installation error, sad after a minute online to find the reason

Originally MongoDB was developed in C + +, to run MongoDB, you must install the Visual C + + redistributable Package

Official website: https://www.microsoft.com/zh-CN/download/details.aspx?id=48145

If installing the Visual C + + redistributable package fails, make sure that the operating system has SP1 patches,

SP1 Patch for: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=5842

Install the Visual C + + redistributable package, and then install the MongoDB boot service, found this time no error, is not slightly excited

Start the MongoDB service with the following command

C:\mongodb\bin>net Start MongoDB

Or find a MongoDB service inside the service to start

After you start the MongoDB service, you can connect to the MongoDB database for operation.

You can add the MongoDB directory (c:\MongoDB\bin) to the environment variable, so that you can use the MongoDB command-line tool in any location

MongoDB Base MongoDB Installation

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.