In the current scenario, we are working on the Ubuntu workstation, so let's install MongoDB on Ubuntu as follows.
We will use the Ubuntu package management tool, such as apt, to install the MongoDB packages by authenticating the distributor-signed packages with the GPG keys.
To import the GPG keys, use the following command:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
Next, we need to set the MongoDB repository path to our operating system, as follows:
$ echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
Once this is added, we need to update our Ubuntu repository as follows:
$ sudo apt-get update
Now that the repository is updated, let's install the latest stable MongoDB release using the following command:
$ sudo apt...