在 Windows 中永远使用永远运行 mongodb [英] Running mongodb forever using forever in windows

查看:56
本文介绍了在 Windows 中永远使用永远运行 mongodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows 10 上永远在本地运行 MongoDB 服务器.为此,我使用了永远的 server.js,这会引发错误,即 Forever 未安装.

我安装了 npm.但后来也显示了同样的错误.我关注了this指南,但它适用于 Ubuntu.我使用的是 Windows 10.

我需要一些类似的东西,如果我也关闭服务器 cmd,它应该继续运行.

解决方案

1.mongod --install --dbpath D:\data\db --logpath D:\log\mlog.txt2. 网络启动MongoDB

<块引用>

以上所有命令都应以管理员身份运行,您可以使用您的路径更改dbPatha和logpath

如何开始&从命令行停止 mongo DB 服务器

I am trying to run MongoDB server forever locally on Windows 10. And for that I'm using forever server.js which throws an error i.e, Forever is not installed.

I did npm install. But then too showing the same error. I have followed this guide, but it's for Ubuntu. I am using Windows 10.

I need something like if I close the server cmd also, it should keep running.

解决方案

1. mongod --install --dbpath D:\data\db --logpath D:\log\mlog.txt
2. net start MongoDB

All above command should be run as administrator and you can change dbPatha and logpath with your path

How to start & stop a mongo DB server from the command line

这篇关于在 Windows 中永远使用永远运行 mongodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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