We're here to assist with any of your needs, don't hestitate to reach out.
MongoDB is a popular NoSQL database management system that provides high performance, scalability, and flexibility. In this tutorial, we will guide you through the process of installing MongoDB on Ubuntu 22.04.
Start by importing the MongoDB's GPG key for package verification. Open the terminal and execute the following command:
$ wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
Next, add the official MongoDB repository to your system's package sources list:
$ echo "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu $(lsb_release -sc)/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Now, update the package repository to ensure you have the latest available packages by running the following command:
$ sudo apt update
Once the package repository is updated, you can proceed with installing MongoDB using the following command:
$ sudo apt install -y mongodb-org
After the installation is complete, MongoDB is not started automatically. You can start and enable the MongoDB service using the following commands:
$ sudo systemctl start mongod
$ sudo systemctl enable mongod
Lastly, verify the MongoDB installation to ensure it has been successfully installed. Run the following command:
$ mongo --eval "db.version()"
If the installation is successful, you will see the version information of MongoDB outputted in the terminal.
Congratulations! You have successfully installed MongoDB on Ubuntu 22.04. MongoDB is now ready to use for your applications, and you can start working with its powerful NoSQL database features.
What our customers say about us
Create your free account today.