MongoDB is a free and open-source database management system that is designed for scalability, flexibility, and ease of development. It is classified as a NoSQL database which is different than traditional table-based SQL databases like MySQL and PostgreSQL.

MongoDB 7.0 is now generally available and ready for use which offers a comprehensive suite of features designed to streamline operations, improve performance, and enhance security. With this release, MongoDB reaffirms itself as a top choice for organizations looking to boost the productivity of their development teams as they build modern, distributed applications. Version 7.0 has all the features released in prior versions with additional features aimed at making it easier for developers to build software.

What’s new with MongoDB 7.0

4 Big Reasons to Upgrade to MongoDB 7.0

  • Enhanced performance – MongoDB 7.0 brings significant improvements to working with time series data, especially demanding, high-volume datasets of all shapes. These improvements result in improved storage optimization and compression, as well as improved query performance. Developers will experience even better handling of high cardinality data, improved scalability, and overall performance; enabling you to manage time-series data more efficiently and cost-effectively.
  • Smoother migrations – Updates to cluster-to-cluster sync (mongosync) will enable more efficient data migration in a variety of scenarios. Cluster-to-cluster sync now provides greater flexibility in syncing between clusters with unlike topologies, such as from replica sets to sharded clusters. Filtered sync allows for syncing specific data sets instead of the entire cluster.
  • Streamlined developer experience – With new enhancements to the aggregation pipeline — including compound wildcard indexes, approximate percentiles, and bitwise operators — developers can enjoy greater flexibility and performance in indexing and querying data. With MongoDB 7.0, developers can also implement user role variables within aggregation pipelines enabling a single view to display different data based on the logged-in users’ permissions.
  • Stronger security – MongoDB 7.0 strengthens security capabilities with Queryable Encryption to help customers encrypt sensitive data and run equality queries on fully randomized encrypted data. The security enhancements ensure that developers can build and deploy applications with confidence, knowing that their data is protected and compliant with the latest security standards and protocols.

MongoDB Lifecycle

VersionRelease DateEnd of life
7.0August 2023TBD
6.0July 2022July 2025
5.0July 2021October 2024
4.4July 2020February 2024
4.2August 2019April 2023

IMPORTANT : v4.2 reached end of life on April 2023 and is no longer officially supported by MongoDB.


Steps to install MongoDB 7.0 on Linux servers

Installation of database MongoDB 7.0 on Linux is easy. This guide will help you how to install MongoDB 7.0 Community Edition on Linux servers like Ubuntu, Debian, CentOS, RHEL, Oracle Linux, Rocky Linux and AlmaLinux.


  • sudo privileges.
  • Stable internet connection.
  • Disable SELinux and Firewall.

First check server OS version then start installation as per OS version:

# egrep '^(VERSION|NAME)=' /etc/os-release


When you are using any VPS server then you need to verify server compatibility with MongoDB. Please run below command to check server compatibility.

# grep -qm1 '^flags.*avx' /proc/cpuinfo && echo OK || echo NOT OK

If print OK on the console then you can continue with the installation, If print NOT OK then your CPU doesn’t support MongoDB 7.0 and MongoDB only supports Oracle Linux running the Red Hat Compatible Kernel (RHCK). MongoDB does not support the Unbreakable Enterprise Kernel (UEK).

MongoDB Installation on Red Hat family:

Steps to install MongoDB 7.0 on Red Hat Enterprise Linux, CentOS, Oracle Linux, Rocky Linux, Amazon Linux and Alma Linux.

Set up MongoDB yum repository for Red Hat Enterprise LinuxCentOS, Oracle Linux Rocky Linux and Alma Linux:

# tee /etc/yum.repos.d/mongodb-org-7.0.repo<<EOM
name=MongoDB Repository

Set up MongoDB yum repository for Amazon Linux 2:

# tee /etc/yum.repos.d/mongodb-org-7.0.repo<<EOM
name=MongoDB Repository

Set up MongoDB yum repository for Amazon Linux 2023:

# tee /etc/yum.repos.d/mongodb-org-7.0.repo<<EOM
name=MongoDB Repository

To install MongoDB 7.0, run the following command:

# yum install -y mongodb-org

MongoDB Installation on Debian family:

Steps to install MongoDB 7.0 on Debian and Ubuntu

Install the prerequisites:

# apt install -y curl wget gnupg lsb-release

import the MongoDB public GPG Key

# wget -qO - | sudo apt-key add -

The operation should respond with an OK

Now set up the apt repository as per your Ubuntu version:

For Ubuntu 22.04 (Jammy)
# echo "deb [ arch=amd64,arm64 ] jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Ubuntu 20.04 (Focal):
# echo "deb [ arch=amd64,arm64 ] focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Ubuntu 18.04 (Bionic):
# echo "deb [ arch=amd64,arm64 ] bionic/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Ubuntu 16.04 (Xenial):
# echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

Or set up the apt repository as per your Debian version:

For Debian 11 "bullseye"
# echo "deb bullseye/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Debian 10 "Buster"
# echo "deb buster/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Debian 9 "Stretch"
# echo "deb stretch/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Debian 8 "Jessie"
# echo "deb jessie/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

Then update the local package database:

#  apt update

Note: If you are facing any GPG error like “signatures couldn’t be verified because the public key is not availablethen run

# apt-key adv --keyserver --recv-keys 160D26BB1785BA38 && apt update

Then Install the MongoDB 7.0 latest version:

# apt install -y mongodb-org

 Managing the MongoDB service

let’s review some basic management commands.

Verify installed version of MongoDB:

# mongod -version

Start the MongoDB service:

# systemctl start mongod.service

Check status of the MongoDB service:

# systemctl status mongod.service

If you receive an error or service failed to start then run the following commands:

# systemctl daemon-reload
# chown mongod:mongod /tmp/mongodb-27017.sock
# systemctl start mongod.service

Restart the MongoDB service:

# systemctl restart mongod.service

If you want to stop MongoDB service:

# systemctl stop mongod.service

By default, MongoDB service is disabled to start automatically when the server boots. If you want to enable it at startup, run:

# systemctl enable mongod.service

Re-disable the service to start up at boot:

# systemctl disable mongod.service

Uninstall MongoDB 7.0

To completely remove MongoDB from a system, you must remove the MongoDB applications, the configuration files, and any directories containing data and logs.

WARNING: This 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 mongod service

# systemctl stop mongod.service

Remove any MongoDB packages that previously installed.

For RHEL / CentOS/ Oracle Linux / Rocky Linux / Amazon Linux

# yum erase $(rpm -qa | grep mongodb-org)

For Ubuntu / Debian

# apt autoremove --purge mongodb-org

Remove MongoDB databases and log files.

# rm -rf /var/log/mongodb
# rm -rf /var/lib/mongo


Congratulations! We’ve installed latest MongoDB 7.0 on Linux system. We hope this 2 minutes stuff helped you and thank you for visiting our website.