How to Install MongoDB 4.4 on Ubuntu 18.04 & 16.04 via PPA
MongoDB is a fully flexible index support and rich queries database. MongoDB is a NoSQL database. MongoDB provides large media storage with GridFS. Click here for more details about this version of MongoDB.
This tutorial will help you to install MongoDB 4.4 community release on Ubuntu 20.04 LTS (Focal), 18.04 LTS (Bionic), and 16.04 LTS (Xenial) systems.
Step 1 – Setup Apt Repository
First of all, import the GPK key for the MongoDB apt repository on your system using the following command. This is required to test packages before installation
Lets add MongoDB APT repository url in /etc/apt/sources.list.d/mongodb.list.
Ubuntu 18.04 LTS:
Ubuntu 16.04 LTS:
Step 2 – Install MongoDB on Ubuntu
After adding the required APT repositories, use the following commands to install MongoDB on your systems. It will also install all dependent packages required for MongoDB.
If you want to install any specific version of MongoDB, define the version number as below
Step 3 – Manage MongoDB Service
After installation, MongoDB will start automatically. To start or stop MongoDB uses init script. Below are the example commands to do.
Once the service started, check the status by running command:
Use the following commands to stop or restart the MongoDB service.
- How to Work with MongoDB – Read this tutorial
Step 4 – Verify MongoDB Installation
Finally, use the below command to check the installed MongoDB version on your system.
Output:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Also, connect MongoDB using the command line and execute some test commands for checking proper working.
More Useful tutorials
Here is the list of useful tutorials for the MongoDB server.
- Create and Drop database in Mongodb
- Enable authentication in Mongodb
- Shell script to backup Mongodb
- Backup and restore database in Mongodb
Conclusion
In this tutorial, you have learned to install the MongoDB database server on the Ubuntu system.
0 Comments
CAN FEEDBACK
Emoji