Installing MongoDB and its configuration environment under Windows

Source: Internet
Author: User

MongoDB installation is very simple, set up the installation path, always next until the end of the installation, the largest pit is the installation of MongoDB service, the following specific after the MongoDB installation of some configuration operations

First, download

First download the appropriate installation package to the official website (http://www.mongodb.org/downloads)

  

Second, installation

Put it where you want to install it: E:\java\MongoDB\Server\3.2

Click to install: Mongodb-win32-x86_64-2008plus-ssl-3.2.10-signed.msi

  

1, agree to the agreement;

2, Custom installation, select "Costom"

3. Select Install in E:\java\MongoDB\Server\3.2\and select the installed components

4. Complete Installation

Create the database path (data directory), log path (logs directory), and log file (Mongo.log file), as shown in

1. Create the configuration file mongo.conf, the file contents are as follows:

Dbpath=d:\program files\mongodb\server\3.2\data #数据库路径  logpath=d:\program files\mongodb\ Server\3.2\logs\mongo.log #日志输出文件路径  logappend=true  #错误日志采用追加模式  Journal =true  #启用日志文件,  quiet=true  #这个选项可以过滤掉一些无用的日志信息 is enabled by default, If you need to debug use set to False  port=27017 #端口号 default is 27017  

2. Start MongoDB

After the first two steps are completed, you can start MongoDB, first enter the D:\Program files\mongodb\server\3.2\bin (depending on the installation directory) directory, the Start command is as follows:

" D:\Program files\mongodb\server\3.2\mongo.conf "  

After the command executes, enter http://127.0.0.1:27017 in the browser to see the following interface that indicates the success of the launch

Iv. Creating and starting MongoDB services

If every time you follow step three, it would be quite a hassle to create and start the MongoDB service by following the command below, you can manage the startup and shutdown of MongoDB through the Windows service

First enter the D:\Program files\mongodb\server\3.2\bin (depending on the installation directory) directory, the Start command is as follows:

" D:\Program files\mongodb\server\3.2\mongo.conf " " MongoDB "   net start MongoDB  

Stop service: net stop MongoDB

If you need to uninstall MongoDB service, first enter D:\Program Files\mongodb\server\3.2\bin (depending on the installation directory) directory, execute the following command:

" MongoDB "

At this point, all operations have been completed and the service has been successfully installed.

Installing MongoDB and its configuration environment under Windows

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.