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

Ubuntu Weekly Newsletter Issue 873

Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…

1 day ago

How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…

1 day ago

Remembering and thanking Steve Langasek

The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…

1 day ago

How to Change Your Prompt in Bash Shell in Ubuntu

I don’t like my prompt, i want to change it. it has my username and…

2 days ago

The Silent Guardian: Why Bundler Checksums Are a Game-Changer for Your Applications

Introduction: A Fragile Trust The Ruby ecosystem relies heavily on RubyGems.org as the central platform…

3 days ago

How to Install Snipe-IT on Ubuntu 24.04

Asset management is the process of managing and maintaining a company’s assets to maximize their…

7 days ago