Docs 菜单

mongocli config

配置配置文件以存储 MongoDB 部署的访问设置。

在用户配置文件中配置设置。 所有设置都是可选的。 您可以通过运行以下命令单独指定设置: $ mongocli config 设立 --help

您还可以在运行该工具时使用环境变量 (MCLI_*)。要了解更多信息,请参阅文档:https://mongodb.com/zh-cn/docs/mongocli/stable/configure/environment-variables/。

mongocli config [options]
名称
类型
必需
说明
-h,--help
false
配置帮助
--service
字符串
false
MongoDB服务的类型。 有效值: 云|cloud-manager|ops-manager(默认为 "云")
名称
类型
必需
说明
-P, --profile
字符串
false
配置文件中要使用的配置文件。
To configure the tool to work with Atlas
$ mongocli config
To configure the tool to work with Cloud Manager
$ mongocli config --service cloud-manager
To configure the tool to work with Ops Manager
$ mongocli config --service ops-manager

由MongoDB CLI在 29 -Jun- 2021 自动生成