参考 > 参考 > MongoDB软件包组件 > mongod.exe
mongod.exe
是mongod
用于Windows平台的MongoDB守护程序(即)的构建。mongod.exe
具有mongod
Unix类平台上的所有功能,
并且与的其他版本完全兼容mongod
。此外,
mongod.exe
提供了一些与Windows平台本身进行交互的选项。
本文档仅引用特有的选项
mongod.exe
。mongod.exe
支持所有
mongod
选项,但记录的Windows不兼容的选项除外。有关此处未列出的选项的更多信息,请参见mongod和
配置文件选项文档mongod
。
要安装和使用mongod.exe
,请阅读
在Windows上安装MongoDB社区版文档。
mongod.
exe
¶--install
¶将mongod.exe安装为Windows服务并退出。
如果需要,您可以为mongod.exe的多个实例安装服务
。为每个服务安装一个唯一的--serviceName
和--serviceDisplayName
。仅当存在足够的系统资源且您的系统设计需要它时才使用多个实例。
--remove
¶删除mongod.exe Windows服务。如果mongod.exe正在运行,该操作将停止,然后删除该服务。
--remove
要求--serviceName
如果配置了非默认--serviceName
的过程中
--install
运行。
--reinstall
¶移除了mongod.exe并重新安装mongod.exe 作为Windows服务。
--serviceName
name
¶默认值:MongoDB
设置作为Windows服务运行时的mongod.exe服务名称。在和
操作中使用该名称。net start <name>
net stop <name>
您必须--serviceName
与--install
或--remove
选项结合使用。
--serviceDisplayName
<name>
¶默认值:MongoDB
设置在Services管理应用程序上为MongoDB列出的名称。
--serviceDescription
<description>
¶默认值:MongoDB服务器
设置mongod.exe服务描述。
您必须--serviceDescription
与该--install
选项结合使用
。
对于包含空格的描述,必须将描述用引号引起来。
--serviceUser
<user>
¶在特定用户的上下文中运行mongod.exe服务。该用户必须具有“作为服务登录”特权。
您必须--serviceUser
与该--install
选项结合使用
。
--servicePassword
<password>
¶设置密码<user>
为mongod.exe与运行时--serviceUser
选项。
您必须--servicePassword
与该--install
选项结合使用
。