How to Install MongoDB on Ubuntu 14.04

Jose Velazquez
by Atlantic.Net (71posts) under HIPAA Compliant Database Hosting
0 Comments
Verified and Tested 02/25/15

Introduction

In this How-To, we will walk you through the basic install and configuration of MongoDB on your Ubuntu 14.04 Cloud Server.

MongoDB is database software that stores specified information in one single table document instead of creating separate table documents for an item. This make it easier to work with and space efficient.

Prerequisites

A cloud server with Ubuntu 14.04 already installed. If you do not already have a server, why not consider spinning up a cloud server from Atlantic.Net.

Installing MongoDB on Ubuntu

Import public key of 10gen repository into our system:

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

Add the 10 gen MongoDB APT repository url in /etc/apt/sources.list.d/mongodb.list.

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

Update your system and install MongoDB in your system.

sudo apt-get update
sudo apt-get install mongodb-org

Start/Stop MongoDB with the following:

sudo service mongod start
sudo service mongod stop

Verify the MongoDB version that is currently installed:

mongo --version

Connect to your MongoDB:

mongo

Run the following to verify your installation:

db.test.save( { tecadmin: 100 } )
db.test.find()

Output below:

{ "_id" : ObjectId("52b0dc8285f8a8071cbb5daf"), "tecadmin" : 100 }
{ "_id" : ObjectId("54eb3ae8e7e4fe28bbb52e07"), "tecadmin" : 100 }

Congratulations! You have just installed MongoDB on your Ubuntu 14.04 Cloud Server. Thank you for following along in this How-To and check back with us for any new updates – or read more about our HIPAA compliant database hosting.

Not sure what you need?

Get a free consultation today!

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources

We use cookies for advertising, social media and analytics purposes. Read about how we use cookies in our updated Privacy Policy. If you continue to use this site, you consent to our use of cookies and our Privacy Policy.