MongoDB Download and Installation documentation

Source: Internet
Author: User
Tags create mongodb documentation mongodb download

The installation and environment configuration of MongoDB under WINDOWS10 system:

The installation of MongoDB

: https://www.mongodb.com/download-center

(This is a tutorial under the WINDOWS10 environment!) Please note! )

After downloading, we click Mongodb-win32-x86_64-2008plus-ssl-3.4.3-signed.msi (the latest version of the 2017.4.16 update) to enter the installation

  

installation Process (not illustrated here): Next--> custom--> Select your installation directory, create a new directory, preferably configured-and then with the progress bar, the installation is complete

MONGDB Environment Configuration

First, we first create a file named "Mongod.config" in the Bin directory, and enter it in:

# #database Directory

Dbpath=d:\mongodb\data

# #log File

Logpath=d:\mongodb\log

Then save the file, and keep looking down.

First, directly configure MongoDB as a service

(The advantage of this is that it eliminates the need to enter a data path each time you start, so you can write the startup database as a window service for convenience.) )

First, we first create the log and data folders in the MongoDB directory, respectively, for storing logs

We will start the cmd command line as an administrator and configure the path to the Mongodb/server/3.4/bin directory.

  

Then we enter a line of IMPORTANT commands: SC create MongoDB binpath= "D:\MongoDB\Server\3.4\bin\mongod.exe--service--dbpath d:\MongoDB\data-- Logpath=d:\mongodb\log\mongodb.log--logappend--directoryperdb "

This line of command creates a service item and we can view the service in the following ways:

"Win+r" into "Run" interface, enter "Services.msc" into "service"--

  

Then go to the following interface, we can see in the name here you can see a service item named "MongoDB", and then click the right mouse button, "Start" the service item.

  

OK, here, our service is started successfully, another way to start the service is: start cmd as an administrator, enter the net start MongoDB in cmd, and then appear the MongoDB service started successfully the word that we started the service successfully!

Second, direct start MongoDB

Without creating a service, we can also open the command line input in the bin directory: Mongod.exe--dbpath "D://mongodb//data"--logpath "D://mongodb//log//mongodb.log"-- Logappend

You can also start MongoDB

(resolution: Mongod--dbpath command is to create a database file storage location, the start of the MongoDB service needs to determine the location of the database files, or the system will not be automatically created, startup will not be successful. )

--logpath indicates that the log file is stored in a path--logappend means that the log file is written in an appended way

After the service is started, let's say how to configure the environment variables!

Right-click on "Computer" "Properties"

  

Select "Environment variable" to enter the interface shown below

Select the "Path" labeled on the graph to jump out of the interface as shown

  

Select "New"

We enter our own installed MongoDB Bin folder path in the new build and choose "OK"!

Environment variable Configuration succeeded! Once the environment variable is configured, we can start the MongoDB database by entering MONGO in CMD.

Let's look at the effect:

Open cmd, enter MONGO, see as shown

  

OK, here, our MongoDB database in the WINDOWS10 system complete installation configuration is finished, next is on demand to learn some ORM or ODM things, see your needs (escape.

MongoDB Download and Installation documentation

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.