如何将 MongoDB 作为 Windows 服务运行? [英] How can I run MongoDB as a Windows service?

查看:32
本文介绍了如何将 MongoDB 作为 Windows 服务运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置 MongoDB 以便它可以作为 Windows 服务运行?

How can I set up MongoDB so it can run as a Windows service?

推荐答案

我认为如果您使用 --install 命令行开关运行它,它会将其安装为 Windows 服务.

I think if you run it with the --install command line switch, it installs it as a Windows Service.

mongod --install

可能值得先阅读这个主题尽管.写入相关注册表项时,相对/绝对路径似乎存在一些问题.

It might be worth reading this thread first though. There seems to be some problems with relative/absolute paths when the relevant registry key gets written.

这篇关于如何将 MongoDB 作为 Windows 服务运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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