Install MongoDB on Ubuntu

June 17, 2016 by S4

Filed under Hadoop, MongoDB

Last modified June 17, 2016

Install MongoDB on Ubuntu

Configure Package Management System (APT)

The Ubuntu package management tool (i.e.dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 7F0CEB10

mongodb install on ubunty

mongodb install on ubunty

Create a /etc/apt/sources.list.d/mongodb.list file using the following command.
echo ‘deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list

mongodb install on ubunty

mongodb install on ubunty

Now issue the following command to reload your repository:
sudo apt-get update

mongodb install on ubunty

mongodb install on ubunty

Install Packages
Issue the following command to install the latest stable version of MongoDB:
sudo apt-get install mongodb-10gen

mongodb install on ubunty

mongodb install on ubunty

When this command completes, you have successfully installed MongoDB! Continue for configuration and start-up suggestions.

mongodb install on ubunty

mongodb install on ubunty

 

Refer http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

 

Leave a Comment