WIN10+MONGODB installation Configuration

Source: Internet
Author: User
Tags install mongodb log log

Just entered the new company, using MongoDB, so recently began to study MongoDB.

MONGO's introductory learning materials can be http://www.runoob.com/mongodb/mongodb-tutorial.html. Install MongoDB locally under WIN10:

First to the official website to download the installation package, of course, I download the official website is slow, so simply Baidu under a, version is mongo3.2, the download process can be Baidu

1. Install to the custom directory:

     

2. Create folders and new files 1, create directories and empty files under the installation directory:
D:\MyProgramFiles\mongoDB\Server\3.2\data   database directory D:\MyProgramFiles\mongoDB\Server\3.2\logs  Log storage directory D:\MyProgramFiles\mongoDB\Server\3.2\logs\mongodb.log log file D:\MyProgramFiles\mongoDB\Server\ 3.2\conf\mongodb.config configuration file

Note:

You can also configure the directory of config using the method of adding parameters at startup, as shown in:

However, the use of Config mode is recommended for easy modification;

2. configuration file Mongodb.config
   dbpath=d:\myprogramfiles\mongodb\server\3.2\data #数据库路径 logpath=d:\myprogramfiles\mongodb\server\3.2 \logs\mongodb.log #日志输出文件路径 Logappend=true  #错误日志采用追加模式, configuring this option after MongoDB's log is appended to the existing log file, Instead of creating a new file Journal=true  #启用日志文件, quiet=true  #这个选项可以过滤掉一些无用的日志信息 is enabled by default, If you need to debug use set to False port=27017 #端口号 default is 27017

Such as:

    

Attention:

3. Configure the MONGODB environment variables first:

  

4, start with the administrator mode to start cmd,

    

Normal Startup

Mongod--config D:\MyProgramFiles\mongoDB\Server\3.2\conf\mongodb.config

Install as a Windows service

Mongod--config D:\MyProgramFiles\mongoDB\Server\3.2\conf\mongodb.config--install

Here, the service is started

5. Open Service

Under administrator cmd,

Start the service:

net start MongoDB

    

To close the service:

net stop MongoDB

Then use MONGO:

   

WIN10+MONGODB installation Configuration

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.