In this article, we will have explained the necessary steps to install and configure Install MongoDB on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.
MongoDB is an open source NoSQL database written in C++ for massive scalability, high performance, and availability. It stores data in JSON-like documents and supports Ad hoc queries, indexing, and real-time aggregation.
Install MongoDB on Debian
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
Step 2. Install MongoDB.
First, add MongoDB repository:
echo"deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.0 main"
To install MongoDB 4, you have to run the following command:
Once the installation is completed, start the MongoDB daemon and enable it to start on boot by typing:
Finally, use the below command to check installed MongoDB version on your system:
Also, connect MongoDB using the command line and execute some test commands for checking proper working:
Congratulation, you have learned how to install and configure Install MongoDB on Debian 10 on Debian 10 Buster. If you have any question, please leave a comment below.