Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs 菜单
Docs 主页
/

安装 MongoDB

MongoDB 提供两种服务器版本:社区版企业版

本节包含有关安装MongoDB 的信息。

  • 要将当前部署升级到MongoDB 8.3,请参阅 8.3 升级程序。

  • 要升级到当前版本的最新补丁发布,请参阅升级到MongoDB的最新自管理补丁版本。

注意

如果您使用 APT、DNF 或 Zypper 等包管理器安装MongoDB ,请使用操作系统的包管理工具在补丁版本内进行升级。对于主要版本和次要版本,请按照您操作系统的安装说明进行操作。

MongoDB安装教程适用于以下平台上的 Community Edition 和 Enterprise Edition:

要安装MongoDB Community Edition,请参阅安装MongoDB Community Edition。选择您的平台,然后按照操作系统的说明进行操作。

要安装MongoDB Enterprise版,请选择适合您平台的教程,然后按照适用于您操作系统的说明进行操作。

平台
Tutorial

Linux

macOS

Windows

Docker

重要

请勿使用这些说明升级到其他发布版本。如需升级发布版本,请参阅相应的版本升级说明,如升级到 MongoDB 8.3

重要

MongoDB 不支持 32 位 x86 平台。

重要

v6.0 生命周期结束

v6.0 已于 7 月 31、2025 达到生命周期结束, MongoDB不再提供支持。

平台
架构
版本
8.0
7.0

Amazon Linux 2023

x86_64

Enterprise

Amazon Linux 2023

x86_64

Community

Amazon Linux V2

x86_64

Enterprise

Amazon Linux V2

x86_64

Community

Debian 12

x86_64

Enterprise

Debian 12

x86_64

Community

Debian 11

x86_64

Enterprise

Debian 11

x86_64

Community

RHEL/Rocky/Alma/Oracle Linux 9.0+ [1]

x86_64

Enterprise

RHEL/Rocky/Alma/Oracle Linux 9.0+ [1]

x86_64

Community

RHEL/Rocky/Alma/Oracle Linux 8.0+ [1]

x86_64

Enterprise

RHEL/Rocky/Alma/Oracle Linux 8.0+ [1]

x86_64

Community

RHEL/Oracle Linux 7.0+ [1]

x86_64

Enterprise

RHEL/Oracle Linux 7.0+ [1]

x86_64

Community

SLES 15

x86_64

Enterprise

SLES 15

x86_64

Community

SLES 12

x86_64

Enterprise

SLES 12

x86_64

Community

Ubuntu 24.04

x86_64

Enterprise

Ubuntu 24.04

x86_64

Community

Ubuntu 22.04

x86_64

Enterprise

Ubuntu 22.04

x86_64

Community

Ubuntu 20.04

x86_64

Enterprise

Ubuntu 20.04

x86_64

Community

Windows 11

x86_64

Enterprise

Windows 11

x86_64

Community

Windows Server 2022

x86_64

Enterprise

Windows Server 2022

x86_64

Community

Windows Server 2019

x86_64

Enterprise

Windows Server 2019

x86_64

Community

macOS 14

x86_64

Enterprise

macOS 14

x86_64

Community

macOS 13

x86_64

Enterprise

macOS 13

x86_64

Community

macOS 12

x86_64

Enterprise

macOS 12

x86_64

Community

macOS 11

x86_64

Enterprise

macOS 11

x86_64

Community

macOS 14

arm64

Enterprise

macOS 14

arm64

Community

macOS 13

arm64

Enterprise

macOS 13

arm64

Community

macOS 12

arm64

Enterprise

macOS 12

arm64

Community

macOS 11

arm64

Enterprise

macOS 11

arm64

Community

Amazon Linux 2023

arm64

Enterprise

Amazon Linux 2023

arm64

Community

Amazon Linux 2

arm64

Enterprise

Amazon Linux 2

arm64

Community

RHEL/Rocky/Alma 9

arm64

Enterprise

RHEL/Rocky/Alma 9

arm64

Community

RHEL/Rocky/Alma 8

arm64

Enterprise

RHEL/Rocky/Alma 8

arm64

Community

Ubuntu 24.04

arm64

Enterprise

Ubuntu 24.04

arm64

Community

Ubuntu 22.04

arm64

Enterprise

Ubuntu 22.04

arm64

Community

Ubuntu 20.04

arm64

Enterprise

Ubuntu 20.04

arm64

Community

RHEL/Rocky/Alma 9 [RHEL9-tcmalloc-support]

ppc64le

Enterprise

8.0.7+

RHEL/Rocky/Alma 8 [RHEL8-tcmalloc-support]

ppc64le

Enterprise

RHEL/Rocky/Alma 9

s390x

Enterprise

8.0.7+

7.0.20+

RHEL/Rocky/Alma 8 [RHEL8-tcmalloc-support]

s390x

Enterprise

[1](123456) 在 Oracle Linux 上,MongoDB 仅支持 Red Hat Compatible Kernel。
[2] MongoDB 仅支持运行 Red Hat Compatible Kernel (RHCK) 的 Oracle Linux。MongoDB 支持 Unbreakable Enterprise Kernel (UEK)。
[3] 针对 RHEL 版本 8.0+ 发布的 MongoDB 本地部署产品,与 Rocky Linux 版本 8.0+ 和 AlmaLinux 版本 8.0+ 兼容并受支持(前提是这些发行版能满足其承诺,提供完整的 RHEL 兼容性)。
[4] MongoDB 版本 5.0 及更高版本针对 SLES 12 Service Pack 5 进行了测试。MongoDB 的早期版本针对不带服务包的 SLES 12 进行了测试。
[5] MongoDB 版本 7.0 及更高版本针对 SLES 12 Service Pack 4 进行测试。早期版本的 MongoDB 针对不带服务包的 SLES 12 进行测试。
[6] MongoDB 版本 7.0 针对 RHEL 7.9 进行构建和测试。早期版本的 MongoDB 针对 RHEL 7 进行测试,并假定支持向前兼容。

重要

上述平台支持矩阵适用于安装时存在的操作系统版本。如果在安装MongoDB后将托管操作系统升级到上面未列出的版本,则生成的配置不受支持。在不受支持的操作系统上运行时, MongoDB不保证功能或行为正确。

来年

Community Edition

获得技能徽章

免费掌握“MongoDB架构基础”!

了解详情

在此页面上