Install MogoDB on Linux

## Import the public key for package management

sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10

## Create a list file

echo "deb "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

## Reload local packages

sudo apt-get update

## Install latest version of MongoDB

sudo apt-get install -y mongodb-org

## If you need specific version you can do it like this

sudo apt-get install -y mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0

## Try if Mongo is installed


## If Mongo is not running

sudo service mongod start

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s