Install MongoDB on Ubuntu devporto

Install MongoDB on Ubuntu

MongoDB is a JSON-like cross-platform document-oriented database with dynamic schemas which MongoDB calls BSON.

Before we can type in the commands listed, we will need to open a terminal window

Click on the Ubuntu icon on the upper left and then type terminal to search for it. You can then launch it by clicking on it.

Accessing Ubuntu Terminal

Import the public key used by the package management system

Ubuntu 14.04:

sudo apt-key adv --keyserver hkp:// --recv EA312927

Ubuntu 16.04:

sudo apt-key adv --keyserver hkp:// --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Create a list file for MongoDB

Ubuntu 14.04:

echo "deb trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Ubuntu 16.04:

echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list

Once that completes …

Leave a Comment

Your email address will not be published. Required fields are marked *