数据库 - MongoDB ver3.0.12 不支持--fork参数?

查看:568
本文介绍了数据库 - MongoDB ver3.0.12 不支持--fork参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

目前只安装了两个版本
3.0.12
3.2.9
发现两个都无法使用--fork参数
报错信息:
Error parsing INI config file: unrecognised option 'fork'
try 'mongod --help' for more information
于是mongod --help之后,列出的一大窜里根本就没有--fork。
是不是现在的版本不支持--fork参数了

解决方案

刚刚找了一个2.4.5版本的,一样无法使用--fork参数。

The command --fork only works for Linux/Unix. If you need --fork for
running mongod in background, on Windows that can be achieved by
installing mongod as a service. When use mongod --install option to
install mongodb service, the --dbpath and --logpath are required. In
my case, I need use administrator command console to install the
service.

似乎windows不支持--fork参数,解决方案是使用--install安装windows服务。

mongodb.conf文件

cmd下启动服务器

mongodb.log文件

因为直接cmd启动没有足够权限,需要管理员权限打开cmd.exe。

cmd管理员权限启动服务器

mongodb.log文件

接着直接输入net start MongoDB启动服务器之后,就可以关闭窗口(已后台运行)了。

这篇关于数据库 - MongoDB ver3.0.12 不支持--fork参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆