Synopsis
mongos.exe是MongoDB分片的内部构建(即 mongos )(对于Windows平台)。 mongos.exe具有类 Unix 平台上mongos的所有功能,并且与mongos的其他版本完全兼容。 此外, mongos.exe还提供了多个与Windows平台本身交互的选项。
本文档仅引用 mongos.exe 特有的选项。所有 mongos 选项均可用。有关 的更多信息,请参阅mongos 实例 和 自管理配置文件选项mongos.exe 文档。
选项
--install将
mongos.exe安装为 Windows 服务并退出。如有需要,您可以为多个
mongos.exe实例安装服务。使用唯一的--serviceName和--serviceDisplayName安装每项服务。仅当存在足够的系统资源并且您的系统设计有需要时才使用多个实例。
--remove删除
mongos.exeWindows 服务。如果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选项结合使用。