Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save UbuntuEvangelist/0c5c8e6249dc52dd31ae9d81d958038b to your computer and use it in GitHub Desktop.
Save UbuntuEvangelist/0c5c8e6249dc52dd31ae9d81d958038b to your computer and use it in GitHub Desktop.
Install MongoDB in Ubuntu 22.04 LTS
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt update
sudo apt install mongodb-org
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl daemon-reload
sudo systemctl restart mongod
sudo systemctl status mongod
mongod --version
mongo
#mongodb #mongo #mongodb_setup #mongodb_ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment