Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 11 - Install MongoDB

sudo apt update && sudo apt install wget gnupg -y \
  && wget -qO - | sudo apt-key add - \
  && echo "deb bullseye/mongodb-org/6.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list \
  && sudo apt update \
  && sudo apt install -y mongodb-org mongodb-org-server mongodb-org-database mongodb-org-mongos mongodb-org-shell mongodb-org-tools

Start And Enable MongoDB Service

sudo systemctl start mongod
sudo systemctl enable mongod

Check Version

mongod --version


Last updated: 9th January 2023
First published: 9th January 2023