MongoDB 3 + Windows 7 X64 installation and configuration

Source: Internet
Author: User
Tags create mongodb windows 7 x64

Registering Windows services to enable MongoDB to start automatically

1. Run cmd with system administrator

C:\users\admin> D:

C:\users\admin> CD "MongoDB installation directory"

D:\Program files\mongodb\server\3.0\bin> sc.exe Create MongoDB binpath= "\" D:\Program Files\mongodb\server\3.0\bin \mongod.exe\ "--service--httpinterface--logpath \" D:\Program files\mongodb\logs\mongodb.log\ "--logappend--dbpath \ "D:\Program files\mongodb\data\" "Displayname=" MongoDB "start=" Auto "

2, recommend the use of configuration files to install services

(http://docs.mongodb.org/manual/reference/configuration-options/#core-options)

D:\Program files\mongodb\server\3.0\bin>

Sc.exe create MongoDB binpath= "\" D:\Program files\mongodb\server\3.0\bin\mongod.exe\ "--service--config \" D:\Program Files\mongodb\server\3.0\bin\mongodb.conf\ "" Displayname= "MongoDB" start= "Auto"

Configuration:

#数据库存储配置

Storage

#数据库文件保存的路径

DbPath: "D:\\Program files\\mongodb\\data"

#系统日志配置

Systemlog:

Destination:file

#日志路径

Path: "D:\\Program Files\\mongodb\\logs\\mongodb.log"

#日志文件自动累加, rather than covering

Logappend:true

#

Net

#绑定的ip, if there are multiple IPs using "," delimited before and after use without spaces

bindip:127.0.0.1

#代表端口号, the default is 27017 if you do not specify

port:27017

#

http

#是否启动监控网页

Enabled:true

# Open a simple rest API

Restinterfaceenabled:true

Note: The configuration is case-sensitive, and the child configuration needs to be indented 3 characters backwards

3. Remark: Delete Service SC Delete MongoDB

Installation monitoring (Windows Server R2)

MongoDB 3 + Windows 7 X64 installation and 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.