Docs Home → MongoDB Manual These documents provide instructions to install MongoDB Community Edition for supported Linux systems. For the best installation experience, MongoDB provides packages for popular Linux distributions. These packages are the preferred way to run MongoDB. The following guides detail the installation process for these systems: Install on Red HatInstall MongoDB Community Edition on Red Hat Enterprise and related Linux systems using.rpm packages.Install on UbuntuInstall MongoDB Community Edition on Ubuntu
Linux systems using .deb packages.Install on DebianInstall MongoDB Community Edition on Debian systems using .deb packages.Install on SUSEInstall MongoDB Community Edition on SUSE Linux systems using .rpm packages.Install on AmazonInstall MongoDB Community Edition on Amazon Linux AMI systems using .rpm packages.Docs Home → MongoDB Manual On this page
NoteMongoDB AtlasMongoDB Atlas is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started. Use this tutorial to install MongoDB 6.0 Community Edition on Red Hat Enterprise Linux, CentOS Linux, or Oracle Linux [1] using the This tutorial installs MongoDB 6.0 Community Edition. To install a different version of MongoDB Community, use the version drop-down menu in the upper-left corner of this page to select the documentation for that version. NoteEOL Notice
MongoDB 6.0 Community Edition supports the following 64-bit versions of Red Hat Enterprise Linux (RHEL), CentOS Linux, Oracle Linux [1], Rocky Linux, and AlmaLinux [2] on x86_64 architecture:
MongoDB only supports the 64-bit versions of these platforms. MongoDB 6.0 Community Edition on RHEL / CentOS / Oracle / Rocky / AlmaLinux also supports the ARM64 architecture on select platforms. See Platform Support for more information. Before deploying MongoDB in a production environment, consider the Production Notes document which offers performance considerations and configuration recommendations for production MongoDB deployments. Follow these steps to install MongoDB Community Edition using the Create a You can also download the Prior to MongoDB 5.0,
odd-numbered MongoDB release versions, such as To install the latest stable version of MongoDB, issue the following command:
Alternatively, to install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
You can specify any available version of MongoDB. However
Most Unix-like operating systems limit the system resources that a process may use. These limits may negatively impact MongoDB operation, and should be adjusted. See UNIX NoteStarting in MongoDB 4.4, a startup error is generated if the By default, MongoDB runs using the
The package manager creates the default directories during installation. The owner and group name are To use a data directory and/or log directory other than the default directories:
Starting in MongoDB 5.0, a new SELinux policy is available for MongoDB installations that:
If your installation does not meet these
requirements, refer to the SELinux Instructions for Note
ImportantBackward-Incompatible FeatureStarting in MongoDB 5.1, you must run the following command from the directory into which the SELinux policy was previously cloned before you can downgrade to an earlier MongoDB version:
Follow these steps to run MongoDB Community Edition on your system. These instructions assume that you are using the default settings. Init System To run and manage your If you are unsure which init system your platform uses, run the following command:
Then select the appropriate tab below based on the result:
To completely remove MongoDB from a system, you must remove the MongoDB applications themselves, the configuration files, and any directories containing data and logs. The following section guides you through the necessary steps.
WarningThis process will completely remove MongoDB, its configuration, and all databases. This process is not reversible, so ensure that all of your configuration and data is backed up before proceeding. Stop the Remove any
MongoDB packages that you had previously installed. sudo yum erase $(rpm -qa | grep mongodb-org) Remove MongoDB databases and log files.
By default, MongoDB launches with This value can be configured either:
WarningFor more information on configuring
MongoDB Community Edition is available from its own dedicated repository, and contains the following officially-supported packages:
|