Thursday, 12 January 2017

Installing MongoDB on Ubuntu 14.04


MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc. and is free and open-source, published under a combination of the GNU Affero General Public License and the Apache License.

Step 1 -- Import the Public Key

First, we will import the MongoDB GPG public key.

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

Step 2 -- Create a List File

Now, we will add the MongoDB repository details so APT will know where to download the packages from.

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

Step 3 -- Update the packages

sudo apt-get update

Step 4 -- Install MongoDB

sudo apt-get install -y mongodb-org

Step 5 -- Start the service

sudo service mongod start

Step 6 -- Check the service

sudo service mongod status

You have successfully install MongoDB on your machine.

No comments:

Post a comment