Zhixian's Tech Blog

2014-11-21

How to install MongoDB 2.4 on Ubuntu

This blog post documents how to install MongoDB 2.4 onto Ubuntu 14.04, Trusty Tahr.

Summary

1. Add MongoDB public key to apt-get

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

2. Create MongoDB source list.

echo ‘deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list

3. Update apt-get

sudo apt-get update

4, Install MongoDB 2.4.12

apt-get install mongodb-10gen=2.4.12

Screen Dumps

1. Add MongoDB public key to apt-get.

zhixian@SARA: ~_001

2. Create MongoDB source list.

zhixian@SARA: ~_002

3. Update apt-get

zhixian@SARA: ~_003zhixian@SARA: ~_004

4, Install MongoDB 2.4.12

zhixian@SARA: ~_005zhixian@SARA: ~_006

That’s it. After that you can run MongoDB client and try out MongoDB.

mongo

zhixian@SARA: ~_007

Reference

http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-ubuntu/

Advertisements

Blog at WordPress.com.