Database Manual / Self-Managed Deployments / Installation / MongoDB Package Components

mongod.exe

Synopsis简介

mongod.exe is the build of the MongoDB daemon (i.e. mongod) for the Windows platform. 是Windows平台上MongoDB守护进程(即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选项

--install

Installs mongod.exe as 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 --serviceName and --serviceDisplayName. 使用唯一的--serviceName--serviceDisplayName安装每个服务。Use multiple instances only when sufficient system resources exist and your system design requires it.仅当存在足够的系统资源并且系统设计需要时,才使用多个实例。

--remove

Removes the mongod.exe Windows Service. If mongod.exe is running, this operation will stop and then remove the service.删除mongod.exe Windows服务。如果mongod.exe正在运行,此操作将停止,然后删除服务。

--remove requires the --serviceName if you configured a non-default --serviceName during the --install operation.如果在--install操作期间配置了非默认--serviceName,则--remove需要--serviceName

--reinstall
Removes mongod.exe and reinstalls mongod.exe as a Windows Service.删除mongod.exe并将其作为Windows服务重新安装。
--serviceName name

Default: MongoDB

Sets the service name of mongod.exe when running as a Windows Service. Use this name with the net start <name> and net stop <name> operations.设置作为Windows服务运行时mongod.exe的服务名称。将此名称与net start <name>net stop <name>操作一起使用。

You must use --serviceName in conjunction with either the --install or --remove option.您必须将--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.exe service description.设置mongod.exe服务描述。

You must use --serviceDescription in conjunction with the --install option.您必须将--serviceDescription--install选项结合使用。

For descriptions that contain spaces, you must enclose the description in quotes.对于包含空格的描述,必须将描述括在引号中。

--serviceUser <user>

Runs the mongod.exe service in the context of a certain user. This user must have "Log on as a service" privileges.在特定用户的上下文中运行mongod.exe服务。此用户必须具有“作为服务登录”权限。

You must use --serviceUser in conjunction with the --install option.您必须将--serviceUser--install选项结合使用。

--servicePassword <password>

Sets the password for <user> for mongod.exe when running with the --serviceUser option.使用--serviceUser选项运行时,为mongod.exe<user>设置密码。

You must use --servicePassword in conjunction with the --install option.您必须将--servicePassword--install选项结合使用。