This is mainly a restating of the following posts but with them merged together:
Installing mongoDB is pretty straight forward. The instructions actually given in the link for
Installing MongoDB on Ubuntu is essentially all you need except for one caveat. Linux Mint uses the ubuntu linux repositories, but it obviously does not use the same names for its releases. The MongoDB tutorial is unaware of that. So the following tutorial alters the appropriate steps so as to compensate for this
Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
Create a list file for MongoDB
This is the step now that gets fancy. Normally if you were on Ubuntu you would enter this command:
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
But this doesn't work for Mint since your lsb_release value is not going to be that of an Ubuntu release version. So we need to hardcode the appropriate one. You can view what version of Ubuntu each version of Mint is based on The Releases Page. This will tell you what value to put and replace the
$(lsb_release -sc). For example, if you were using Linux Mint 17.1 Rebecca (based on Ubuntu Trusty by the above link), your command would look like this:
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
Reload local package database.
sudo apt-get update
Install the latest stable version of MongoDB
sudo apt-get install -y mongodb-org
This installs the latest version of Mongo. If you would like to install a specific version then refer to the MongoDB documentation. For this step and onward it is the same regardless of whether it is Ubuntu or Mint