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

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

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

In this tutorial, you will learn how to install MongoDB from the default APT repositories on Ubuntu 18.04.

Prerequisites

  • An Ubuntu 18.04 server
  • A terminal window

Step 1: Update the Package List

First, update the package list:

sudo apt update

Step 2: Install MongoDB

Now that the package list is updated, install MongoDB:

sudo apt install mongodb

Step 3: Start MongoDB

Once MongoDB is installed, start the service:

sudo systemctl start mongodb

Step 4: Verify MongoDB Is Running

Check the status of MongoDB to make sure it's running:

sudo systemctl status mongodb

Step 5: Enable MongoDB

Enable MongoDB to start on boot:

sudo systemctl enable mongodb

Conclusion

You've successfully installed MongoDB from the default APT repositories on Ubuntu 18.04. Congratulations!

Keywords: MongoDB, APT, Ubuntu 18.04, install, update, package list, terminal, start, service, status, enable, boot.

Комментарии

Популярные сообщения из этого блога

How To Modify CSS Classes in JavaScript

How To Backup MySQL Databases on an Ubuntu VPS

How To Backup PostgreSQL Databases on an Ubuntu VPS