How to Install MongoDB Repository on Ubuntu Based Systems

December 13, 2017 | By thelinuxevangelist | Filed in: Tutorial.

Install MongoDB Repository Ubuntu

You Are Welcome! This Tip Shows You How to Install MongoDB Repository on Ubuntu GNU/Linux Based OSes.

And MongoDB (from “humongous”) is an Open-Source Document Database written in C++, and the leading NoSQL database.

Finally these instructions are Valid also for:

  • Mint
  • Lubuntu
  • Kubuntu
  • Xubuntu
  • Zorin OS
  • Elementary OS
  • LXLE Linux
  • Linux Lite
  • Bodhi Linux
  • Linux Ultimate Edition
  • Peppermint Linux
How to Install MongoDB Repository Ubuntu Based - Featured
  1. First Import GPG Key

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
  2. Then Setup MongoDB Repo

    • For Ubuntu 18.04 and Mint 19.x

      echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    • For Ubuntu 16.04 and Mint 18.x

      echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    • Instead for Ubuntu 14.04 to 15.10 and Mint 17.x

      echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
    • Finally for Ubuntu 12.04 to 13.10 and Mint 13-16

      echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu precise/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
  3. And to Reload Apt Sources

    sudo apt-get update

Tags: , , , , , , , , , , , , , , , , , , ,