Synopsis简介
mongos.exe is the build of the MongoDB Shard (i.e. mongos) for the Windows platform. mongos.exe has all of the features of mongos on Unix-like platforms and is completely compatible with the other builds of mongos. In addition, mongos.exe provides several options for interacting with the Windows platform itself.
This document only references options that are unique to mongos.exe. All mongos options are available. See the mongos Instances and the Self-Managed Configuration File Options documents for more information regarding mongos.exe.
To install and use 要安装和使用mongos.exe, see Install MongoDB Community Edition.mongos.exe,请参阅安装MongoDB社区版。
Options选项
--installInstalls将mongos.exeas a Windows Service and exits.mongos.exe安装为Windows服务并退出。If needed, you can install services for multiple instances of如果需要,您可以为mongos.exe. Install each service with a unique--serviceNameand--serviceDisplayName. Use multiple instances only when sufficient system resources exist and your system design requires it.mongos.exe的多个实例安装服务。使用唯一的--serviceName和--serviceDisplayName安装每个服务。仅当存在足够的系统资源并且系统设计需要时,才使用多个实例。
--removeRemoves the删除mongos.exeWindows Service.mongos.exeWindows服务。If如果mongos.exeis running, this operation will stop and then remove the service.mongos.exe正在运行,此操作将停止,然后删除服务。--removerequires the--serviceNameif you configured a non-default--serviceNameduring the--installoperation.
--reinstall- Removes
mongos.exeand reinstallsmongos.exeas a Windows Service.
--serviceName nameDefault: MongoS
Sets the service name of
mongos.exewhen running as a Windows Service. Use this name with thenet start <name>andnet stop <name>operations.You must use
--serviceNamein conjunction with either the--installor--removeoption.
--serviceDisplayName <name>Default: Mongo DB Router
Sets the name listed for MongoDB on the Services administrative application.设置服务管理应用程序上列出的MongoDB名称。
--serviceDescription <description>Default: Mongo DB Sharding Router
Sets the
mongos.exeservice description.You must use
--serviceDescriptionin conjunction with the--installoption.For descriptions that contain spaces, you must enclose the description in quotes.对于包含空格的描述,必须将描述括在引号中。
--serviceUser <user>Runs the在特定用户的上下文中运行mongos.exeservice in the context of a certain user. This user must have "Log on as a service" privileges.mongos.exe服务。此用户必须具有“作为服务登录”权限。You must use您必须将--serviceUserin conjunction with the--installoption.--serviceUser与--install选项结合使用。
--servicePassword <password>Sets the password for使用<user>formongos.exewhen running with the--serviceUseroption.--serviceUser选项运行时,为mongos.exe的<user>设置密码。You must use您必须将--servicePasswordin conjunction with the--installoption.--servicePassword与--install选项结合使用。