Skip to content

Install MongoDB on Ubuntu desktop




The MEAN stack (MongoDB, Express.js, Angular.js & Node.js) is pretty cool if you're looking to do some real quick smart web development, however there is a little bit of a learning curve if you're cooming from traditional web development database platforms i.e. Relational Database Management Systems (RDBMS).

MongoDB

MongoDB is a document database that provides high performance, high availability, and easy scalability. Documents (objects) map nicely to programming language data types. Embedded documents and arrays reduce need for joins. Indexes can include keys from embedded documents and arrays.

Setting up MongoDB is fairly straight forward on ubuntu 14.04. Using the terminal window type in the following commands

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update
sudo apt-get install mongodb-org

[wpdm_package id='5444'] [wpdm_package id='5442']

How to execute bash scripts




After the installation run the following command

mongod

This will now start the Mongo Process. Then you run a test to check that Mongo responds by typing ;

mongo test

The mongo shell should now be available.

learn more




Install MongoDB on ubuntu 16.04

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org

Check out the Video

Gary Woodfine
Latest posts by Gary Woodfine (see all)