Synopsis简介
mongod.exe is the build of the MongoDB daemon (i.e. 是Windows平台上MongoDB守护进程(即mongod) for the Windows platform. mongod)的构建。mongod.exe has all of the features of mongod on Unix-like platforms and is completely compatible with the other builds of mongod. mongod.exe在类Unix平台上具有mongod的所有功能,并且与mongod其他版本完全兼容。In addition, 此外,mongod.exe provides several options for interacting with the Windows platform itself.mongod.exe还提供了几个与Windows平台本身交互的选项。
This document only references options that are unique to 本文档仅引用mongod.exe. mongod.exe supports all mongod options except those with documented Windows incompatibility. mongod.exe独有的选项。mongod.exe支持所有mongod选项,但有文件记录的Windows不兼容选项除外。See the 有关此处未列出的mongod and the Self-Managed Configuration File Options documents for more information on mongod options not listed here.mongod选项的更多信息,请参阅mongod和自我管理配置文件选项文档。
To install and use 要安装和使用mongod.exe, see Install MongoDB Community Edition.mongod.exe,请参阅安装MongoDB社区版。
Options选项
--installInstalls将mongod.exeas a Windows Service and exits.mongod.exe作为Windows服务安装并退出。If needed, you can install services for multiple instances of如果需要,您可以为mongod.exe.mongod.exe的多个实例安装服务。Install each service with a unique使用唯一的--serviceNameand--serviceDisplayName.--serviceName和--serviceDisplayName安装每个服务。Use multiple instances only when sufficient system resources exist and your system design requires it.仅当存在足够的系统资源并且系统设计需要时,才使用多个实例。
--removeRemoves the删除mongod.exeWindows Service. Ifmongod.exeis running, this operation will stop and then remove the service.mongod.exeWindows服务。如果mongod.exe正在运行,此操作将停止,然后删除服务。如果在--removerequires the--serviceNameif you configured a non-default--serviceNameduring the--installoperation.--install操作期间配置了非默认--serviceName,则--remove需要--serviceName。
--reinstallRemoves删除mongod.exeand reinstallsmongod.exeas a Windows Service.mongod.exe并将其作为Windows服务重新安装。
--serviceName nameDefault: MongoDB
Sets the service name of设置作为Windows服务运行时mongod.exewhen running as a Windows Service. Use this name with thenet start <name>andnet stop <name>operations.mongod.exe的服务名称。将此名称与net start <name>和net stop <name>操作一起使用。You must use您必须将--serviceNamein conjunction with either the--installor--removeoption.--serviceName与--install或--remove选项结合使用。
--serviceDisplayName <name>Default: MongoDB
Sets the name listed for MongoDB on the Services administrative application.设置服务管理应用程序上列出的MongoDB名称。
--serviceDescription <description>Default: MongoDB Server
Sets the设置mongod.exeservice description.mongod.exe服务描述。You must use您必须将--serviceDescriptionin conjunction with the--installoption.--serviceDescription与--install选项结合使用。For descriptions that contain spaces, you must enclose the description in quotes.对于包含空格的描述,必须将描述括在引号中。
--serviceUser <user>Runs the在特定用户的上下文中运行mongod.exeservice in the context of a certain user. This user must have "Log on as a service" privileges.mongod.exe服务。此用户必须具有“作为服务登录”权限。You must use您必须将--serviceUserin conjunction with the--installoption.--serviceUser与--install选项结合使用。
--servicePassword <password>Sets the password for使用<user>formongod.exewhen running with the--serviceUseroption.--serviceUser选项运行时,为mongod.exe的<user>设置密码。You must use您必须将--servicePasswordin conjunction with the--installoption.--servicePassword与--install选项结合使用。