仅安装 Mongo Client/Shell - 不在 Windows 上安装 MongoDB

Install Only Mongo Client/Shell - not MongoDB on Windows

我发现了与 RHEL 完全相同的问题:(我的问题是针对 Windows)

是否有 Windows 相当于:mongodb-org-shell

我可以从另一台 Windows 机器上的服务器安装复制 mongo.exe 吗?

在 Windows 上,您可以使用无人值守安装选项安装每个组件。

MongoDB Download Centre. You can install just the mongo shell 组件下载 .msi 安装程序后,使用:

msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-3.6.5-signed.msi ^
        ADDLOCAL="Client"

另见 Run the Windows Installer From the Windows Command Interpreter

执行 .msi 安装文件后,您可以自定义安装所需的特定组件。

Mongo 下载:https://www.mongodb.com/download-center/community

这是我的解决方案并且有效(只需要 21MB space 并且您不需要安装任何东西。)

  1. 下载 widnows 版本的 Zip 包 (Here)
  2. un-zip 文件
  3. 进入路径“bin”并找到mongo.exe(21MB)。
  4. 删除所有其他文件,或者您可以将 mongo.exe 复制到您想要的地方。