How To Install MongoDB from the Default APT Repositories on Ubuntu 20.04

How To Install MongoDB from the Default APT Repositories on Ubuntu 20.04

In this tutorial you’ll install MongoDB, manage its service, and optionally enable remote access.

Introduction

MongoDB is a free and open-source NoSQL document database used commonly in modern web applications.

In this tutorial you’ll install MongoDB, manage its service, and optionally enable remote access.

Note : As of this writing, this tutorial installs version  3.6  of MongoDB, which is the version available from the default Ubuntu repositories. However, we generally recommend installing the latest version of MongoDB — version  4.4  as of this writing — instead. If you’d like to install the latest version of MongoDB, we encourage you to follow this guide on How To Install MongoDB on Ubuntu 20.04 from source .

Prerequisites

To follow this tutorial, you will need:

  • One Ubuntu 20.04 server set up by following this initial server setup tutorial, including a non-root user with administrative privileges and a firewall configured with UFW.

Step 1 — Installing MongoDB

Ubuntu’s official package repositories include MongoDB, which means we can install the necessary packages using apt. As mentioned in the introduction, the version available from the default repositories is not the latest one. To install the latest version of Mongo, please follow this tutorial instead.

First, update the packages list to have the most recent version of the repository listings:

sudo apt update

Now install the MongoDB package itself:

sudo apt install mongodb

This command will prompt you to confirm that you want to install the mongodb package and its dependencies. To do so, press Y and then ENTER.

This command installs several packages containing a stable version of MongoDB, along with helpful management tools for the MongoDB server. The database server is automatically started after installation.

Next, let’s verify that the server is running and works correctly.

ubuntu

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Install Microsoft Teams on Ubuntu 20.04

In this tutorial, we will show you how to install Microsoft Teams on Ubuntu 20.04 machine. we can install teams using Debian installer file or by adding microsoft repository.

2 Ways to Upgrade Ubuntu 18.04/18.10 To Ubuntu 19.04 (GUI & Terminal)

This tutorial is going to you 2 ways to upgrade Ubuntu 18.04 and Ubuntu 18.10 to 19.04. The first method uses the graphical update manger and the second method uses command line. Usually you use the graphical update manager to upgrade Ubuntu desktop and use command line to upgrade Ubuntu server, but the command-line method works for desktops too.

How to Install TeamViewer on Ubuntu 20.04

In this tutorial, we will walk you through how to install TeamViewer on Ubuntu 20.04 Desktop through the command line using the TeamViewer .deb package.Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.

How to Install PgAdmin 4 on Ubuntu 20.04

How to Install PgAdmin 4 on Ubuntu 20.04 - We are going to show you how to install pgAdmin4 on Ubuntu 20.04 LTS in Server Mode as a web application using apache2 and Wsgi module.

2 Ways to Upgrade Ubuntu 18.04 To Ubuntu 20.04

2 Ways to Upgrade Ubuntu 18.04 To Ubuntu 20.04 : using the graphical update manager and using the command line. Normally you use ...