“” Upgrade mongosh - mongosh - MongoDB Docs
Docs Home / mongosh / Install

Upgrade mongosh

msiexec.exe

This section describes how to upgrade mongosh on Windows through the MSI installer.本节介绍如何通过MSI安装程序在Windows上升级mongosh

Steps步骤

1

(Optional) Remove any existing mongosh binaries from your system(可选)从系统中删除任何现有的mongosh二进制文件

If you skip this step, overwrite the existing mongosh binary when you install the new version.如果跳过此步骤,请在安装新版本时覆盖现有的mongosh二进制文件。

2

Open the MongoDB Shell download page打开MongoDB Shell下载页面

Open the MongoDB Download Center.打开MongoDB下载中心

3

Select your platform and package选择平台和套餐

  1. In the Platform dropdown, select Windows x64.在平台下拉列表中,选择“Windows x64”。
  2. In the Package dropdown, select msi.在“包”下拉列表中,选择“msi”。
4

Click Download点击“下载”

5

Double-click the installer file双击安装程序文件

6

Follow the installation prompts按照安装提示进行操作

7

Ensure that the new mongosh binary is in your system PATH确保新的mongosh二进制文件在系统PATH中

To confirm that you successfully installed the new version of mongosh, run the following command:要确认您已成功安装新版本的mongosh,请运行以下命令:

mongosh --build-info
Zip File

This section describes how to upgrade mongosh on Windows through a downloaded zip file.本节介绍如何通过下载的zip文件在Windows上升级mongosh

Steps步骤

1

(Optional) Remove any existing mongosh binaries from your system(可选)从系统中删除任何现有的mongosh二进制文件

If you skip this step, overwrite the existing mongosh binary when you install the new version.如果跳过此步骤,请在安装新版本时覆盖现有的mongosh二进制文件。

2

Open the MongoDB Shell download page打开MongoDB Shell下载页面

Open the MongoDB Download Center.打开MongoDB下载中心

3

Select your platform and package选择平台和套餐

  1. In the Platform dropdown, select Windows x64.在“平台”下拉列表中,选择“Windows x64”。
  2. In the Package dropdown, select zip.在“包”下拉列表中,选择“zip”。
4

Click Download点击“下载”

5

Extract the files from the downloaded archive从下载的存档中提取文件

The archive contains a bin folder with the following binaries:存档包含一个bin文件夹,其中包含以下二进制文件:

  • mongosh
  • mongosh_crypt
6

Add the path to the extracted bin folder to your system PATH将提取的bin文件夹的路径添加到系统PATH中

7

Verify the installation验证安装

To confirm that you successfully installed the new version of mongosh, run the following command:要确认您已成功安装新版本的mongosh,请运行以下命令:

mongosh --build-info