问题描述:
软件安装在系统盘,数据和日志在非系统盘,或直接安装软件在非系统盘中会出现服务无法启动问题
解决方案:
1.查看mongod.cfg
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: E:\MongoDB\data
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: E:\MongoDB\log\mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#processManagement:
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
mp:
在mongod.cfg中删除最后一行mp: 后保存,重新启动服务。
2.直接使用命令启动
如提示缺少dll,则需安装vc++2015环境。
VC2015安装环境要求如下:
下載地址:https://www.microsoft.com/en-us/download/details.aspx?id=48145
注:
如果系統是windows 2008 R2許先升升級至系統至sp1,SP1补丁下载地址:https://www.microsoft.com/zh-cn/download/details.aspx?id=5842
Windows Server 2012 R2 安装失败请参考:https://www.cnblogs.com/huoniao/articles/6186021.html