omotam img

Skip to main content
  1. Posts/

Install MongoDB Community Edition

··75 words·1 min·
Table of Contents

import Tabs from ‘@theme/Tabs’; import TabItem from ‘@theme/TabItem’;

Requirements #

sudo apt-get install gnupg curl

Configure apt #

Import MongoDB publis GPG key:

curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor

Create apt list:

```bash echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list ``` ```bash echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list ```

Update apt package database:

apt update

Install the latest version:

apt install -y mongodb-org