Ubuntu

How to Install MongoDB on Ubuntu 16.04

In this tutorial we will learn how to install and configure MongoDB, which is the most popular NoSql Database Server.

How to Install MongoDB on Ubuntu 16.04

It is very easy to Install MongoDB on Ubuntu 16.04 with apt repository provides by the MongoDB.

First, we install the Public Key for the apt repository:

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 0C49F3730359A14518585931BC711F9BA15703C6

Then, we create the apt source file:

echo “deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

Next, install MongoDB on Ubuntu 16.04 with apt-get command:

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

To start MongoDB on Ubuntu Type:

Sponsored
sudo systemctl start mongod.service

To enable MongoDB to start when system restart, Type:

Sponsored
systemctl enable mongod.service

Restart MongoDB Server:

sudo systemctl restart mongod.service

The MongoDB Shell is the command line interface to manage MongoDB Server. To open MongoDB shell, Type:

mongo

Ubuntu Server Admin

Recent Posts

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

17 hours ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

1 day ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

2 days ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

3 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

3 days ago

How To Install DNS Server (Bind9) On Ubuntu 20.04

Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…

3 days ago