


Good job! by reaching this point, you learned how to install MongoDB 4 on Debian 10.ĭear user, we wish this tutorial would be helpful for you, to ask any question or review the conversation of our users about this article, please visit Ask page. Next, to log into MongoDB 4 simply: mongoĪnd to stop MongoDB: sudo systemctl stop mongod Then, to enable MongoDB to start on boot: sudo systemctl enable mongod To check the status of a MongoDB service: sudo systemctl status mongod Make sure you have successfully installed MongoDB 4 server, to let you start it. Next, edit the configuration file found at /etc/nf, to change the default MongoDB port and other parameters. sudo apt info mongodb-infoĪs the MongoDB runs on port 27017 by default, verify it by typing: sudo netstat -pnltu Use the following command to check the version of MongoDB installed.

To install libcurl3: sudo apt install libcurl3Īfter installing the required repositories and libcurl3 package, you can now proceed to install MongoDB 4 server. Note: In this guide, we added Debian 9‘s official repository, the libcurl3 package will be installed from the added repository. the reason for installing libcurl3 is to prevent errors trying to install MongoDB. In this step, you see that the package libcurl3 is required by mongodb-org-server which you are going to install later on. Then, update the APT repository: sudo apt update 3- Installing libcurl3 on Debian To add MongoDB 4 package repository of Debian 9 on Debian 10 Buster: echo "deb stretch/mongodb-org/4.0 main" | sudo tee /etc/apt//mongodb-org.listĪnd to add the official repository of Debian 9 on Debian 10 Buster: echo "deb stretch main" | sudo tee /etc/apt//debian-stretch.list In case you can not find the official Package repositories for Debian 10, add the package repository of Debian 9 (Stretch) on Debian 10 (Buster) to make up for that. To import the MongoDB GPG key: sudo apt-key adv -keyserver hkp://:80 -recv 9DA31620334BD75D9DCB49F368818C72E52529D4Ģ- Installing MongoDB 4 APT Repository on Debian To update your system packages: sudo apt update Please consider that this is crucial for testing packages prior to installation. Recommended Article: How to setup a web server with a CWP hosting panel 1- Importing MongoDB GPG Key on Debianįirst, import the GPG key that is required by the MongoDB repository for your Debian system.
