Skip to main content

MongoDB Installation System Requirements

  • 64-bit architecture (x86_64 or ARM64)

  • Minimum 4GB RAM (8GB+ recommended for production)

  • 20GB+ free disk space

  • Supported operating systems: Ubuntu 18.04+, RHEL/CentOS 7+, Windows Server 2019+, macOS 10.14+

Installation Methods Ubuntu/Debian Installation

bash
# Import MongoDB public GPG key
wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | sudo apt-key add -
# Create list file for MongoDB
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
# Update package database
sudo apt-get update
# Install MongoDB packages
sudo apt-get install -y mongodb-org=8.0.10 mongodb-org-database=8.0.10 mongodb-org-server=8.0.10 mongodb-org-mongos=8.0.10 mongodb-org-tools=8.0.10
# Start MongoDB service
sudo systemctl start mongod
sudo systemctl enable mongod

RHEL/CentOS Installation

bash
# Create repository file
sudo tee /etc/yum.repos.d/mongodb-org-8.0.repo << 'EOF'
[mongodb-org-8.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-8.0.asc
EOF
# Install MongoDB
sudo yum install -y mongodb-org-8.0.10
# Start and enable service
sudo systemctl start mongod
sudo systemctl enable mongod
Windows Installation
Download MongoDB 8.0.10 MSI installer from official MongoDB website

Run the installer with administrative privileges

Choose "Complete" installation type

Configure MongoDB as a Windows service

Install MongoDB Compass (optional GUI tool)

Docker Installation

bash

Pull MongoDB 8.0.10 image

docker pull mongo:8.0.10

Run MongoDB container

docker run -d
--name mongodb
-p 27017:27017
-v mongodb_data:/data/db
mongo:8.0.10