MongoDB installation under Win10

Source: Internet
Author: User
Tags mongodb client

Original address: http://blog.csdn.net/polo_longsan/article/details/52430539

1. Download the installation file for MongoDB under Windows

First go to the official website https://www.mongodb.com/download-center?jmp=nav#community download the installation files. Mongodb-win32-x86_64-2008plus-ssl-3.2.9-signed.msi. Double and install, select the installation path.




2, then in the directory under the new Data folder, F:\mongodb\data;logs folder, f:\mongodb\logs;conf folder, F:\mongodb\conf. They are used to store data, logs, and configuration files, respectively.


Under the Conf folder, create a new Mongodb.config file with the following contents:

Dbpath=f:\mongodb\data #数据库路径
Logpath=f:\mongodb\logs\mongodb.log #日志输出文件路径
Logappend=true #错误日志采用追加模式, after configuring this option, the MongoDB log is appended to the existing log file instead of creating a new file
Journal=true #启用日志文件, enabled by default
Quiet=true #这个选项可以过滤掉一些无用的日志信息, set to False if you need to use Debug
port=27017 #端口号 defaults to 27017

Under the Logs folder, create a new Mongodb.log file.

3, open the MongoDB service, start the DOS command window as an administrator, start the MongoDB service, you can see the MongoDB service in the service, the next time directly execute the bin directory of the Mongo.exe client can be operated.

[HTML]View PlainCopy
    1. F:\mongodb\bin>mongod.exe--config F:\mongodb\conf\mongodb.config--install--servicename "MongoDB"
    2. F:\mongodb\bin>net Start MongoDB
    3. The MongoDB service is starting.
    4. MongoDB Service has started successfully.
    5. F:\mongodb\bin>



4, Start MongoDB client Mongo.exe, insert a piece of data and query it out.

MongoDB installation under Win10

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.