mongos.exe
Synopsis
mongos.exe
是MongoDB分片的内部构建(即 mongos
)(对于Windows平台)。 mongos.exe
具有类 Unix 平台上mongos
的所有功能,并且与mongos
的其他版本完全兼容。 此外, mongos.exe
还提供了多个与Windows平台本身交互的选项。
本文档仅引用mongos.exe
特有的选项。所有mongos
选项均可用。有关 的更多信息,请参阅mongos
实例 和 自管理配置文件选项 mongos.exe
文档。
如需安装和使用 mongos.exe
,请阅读在 Windows 上安装 MongoDB Community Edition 文档。
选项
--install
将
mongos.exe
安装为 Windows 服务并退出。如有需要,您可以为多个
mongos.exe
实例安装服务。使用唯一的--serviceName
和--serviceDisplayName
安装每项服务。仅当存在足够的系统资源并且您的系统设计有需要时才使用多个实例。
--remove
删除
mongos.exe
Windows 服务。如果mongos.exe
正在运行,此操作将停止该服务,然后再删除它。如果您在
--install
操作期间配置了非默认--serviceName
,则--remove
将需要--serviceName
。
--reinstall
删除
mongos.exe
并将mongos.exe
作为 Windows 服务重新安装。
--serviceName name
默认:Mongo
设置
mongos.exe
作为 Windows 服务运行时的服务名称。请在执行net start <name>
和net stop <name>
操作时使用此名称。必须将
--serviceName
与--install
或--remove
选项结合使用。
--serviceDescription <description>
默认值:Mongo DB 分片路由器
设置
mongos.exe
服务描述。必须将
--serviceDescription
与--install
选项结合使用。对于包含空格的说明,必须将说明括在引号中。
--serviceUser <user>
在特定用户上下文中运行
mongos.exe
服务。该用户必须具有“作为服务登录”的权限。必须将
--serviceUser
与--install
选项结合使用。
--servicePassword <password>
使用
--serviceUser
选项运行时,为mongos.exe
设置<user>
的密码。必须将
--servicePassword
与--install
选项结合使用。