Install MongoDB Compass on Ubuntu 24.04 | Debian 12

This tutorial will show you how to install and use MongoDB Compass on Ubuntu 24.04 | Debian 12 in a step-by-step manner. MongoDB is a simple, object-oriented, and dynamic database that may be used for a variety of purposes. It’s a document storage that doesn’t use SQL. This indicates that data objects are kept in a collection as distinct documents. This aids in overcoming the use of relational databases. For enormous scalability and excellent speed, MongoDB is developed in C++. It supports both 32-bit and 64-bit architectures and is available for Windows, macOS, and Linux operating systems.

MongoDB Compass is a user interface for MongoDB that helps you make better decisions regarding:

  • document structure
  • querying
  • indexing
  • document validation
  • and more

MongoDB Compass technical assistance is included in commercial subscriptions. Compass rapidly visualizes your schema and calculates the frequency, kinds, and range of values for different fields in your data records.

Features of MongoDB Compass

Below are the cool features of MongoDB Compass:

  • Indexes: Compass makes it simple to build and delete indexes for MongoDB Collection, just like it makes it simple to design and run queries and aggregation pipelines.
  • Interaction: The MongoDB Shell, using Commands, was the only way to interact with Databases, Documents, and Collections before Compass. However, now that Compass is available for use, it has become much easier for non-technical people to connect with the database.
  • Queries: The Compass interface may be used to create and execute queries. Aggregation Pipelines are as simple to design and run as any other query on the compass.
  • Rules: Document Validation Rules may be created, modified, and removed from the compass, just like Documents.
  • Explain: With MongoDB Compass, we have an Explain Plan Tab that shows the query’s execution plan.
  • Performance: Compass is one of the most effective tools for analyzing database data and performance. Performance for queries may also be examined and adjusted with the assistance of visual plans.
  • Reporting: Any database or system that wants to improve has to be able to record and evaluate any odd events, failures, or problems. Compass successfully handles crash reporting, as well as error log collection and improvement procedures.

Installing MongoDB Compass on Ubuntu 24.04 | Debian 12

Follow the steps below to install MongoDB Compass on Ubuntu 24.04, and Debian 12.

Installing MongoDB Compass on Ubuntu 24.04 | Debian 12

Before you can download and install MongoDB compass, you are required to have the following:

  • 64-bit version of Ubuntu 24.04 Debian 12.
  • MongoDB 3.6 or later.

Navigate to MongoDB Compass Download page then pick Ubuntu from the Platform drop-down box on the right side.

You can also use wget command to download MongoDB Compass. First, install wget command on Ubuntu 24.04 and Debian 12 using the following command:

#update the system packages
sudo apt update -y

#install wget
sudo apt install wget -y

Download MongoDB Compass with wget command:

sudo wget https://downloads.mongodb.com/compass/mongodb-compass_1.45.4_amd64.deb

Now, after you have downloaded MongoDB Compass it’s time to install. Execute the following command to install it:

sudo dpkg -i mongodb-compass_*_amd64.deb

Confirm that the installation is successful and no errors are shown.

Selecting previously unselected package mongodb-compass.
(Reading database ... 245603 files and directories currently installed.)
Preparing to unpack mongodb-compass_1.45.4_amd64.deb ...
Unpacking mongodb-compass (1.45.4) ...
Setting up mongodb-compass (1.45.4) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...

To fix any dependency issues run:

sudo apt -f install

Launching MongoDB Compass

Now that you have installed MongoDB Compass successfully on Ubuntu 24.04 and Debian 12, you may use the console to start MongoDB Compass:

$ mongodb-compass

or the Desktop Environment Launcher to start MongoDB Compass:

Example Usage of MongoDB Compass

We’ll look at how to use MongoDB Compass in its most basic form; after running it, we receive the following page:

Connecting to MongoDB Database

Now, assuming you have the MongoDB Database instance installed on your local machine where you installed the Compass GUI, select New Connection and then Connect, as shown below:

If not, you can install MongoDB Community Edition using the following steps:

Import the GPG Key

From a terminal, install gnupg and curl if they are not already available:

sudo apt-get install -y gnupg curl
#Then import GPG key
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
   --dearmor

Add the repository:

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

Update the system package index and install mongodb:

sudo apt update -y
sudo apt-get install -y mongodb-org

Start MongoDB:

sudo systemctl daemon-reload
sudo systemctl start mongod

Connecting to MongoDB Instance

If your database is on a distant system, select the option Fill in connection fields individually and input the remote database server connection details, such as the hostname, username, and password. Also, verify that the remote server’s firewall has port 27017 open and click connect.

Click the Connect button once you’ve entered your local or remote MongoDB credentials. Once you’ve established a connection with the MongoDB server. The following page should be viewed:

Create Database

To create a new database, click the Create Database button. The following page should be viewed:

You should see the database “mydb” created as shown below:

Conclusion

Congratulations! MongoDB Compass has been successfully installed on Ubuntu 24.04 | Debian 12. I hope you found this information useful. Please feel free to ask any questions you may have in the comments section below.

Other Cool Articles:

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Related Post

We looked at how to install Jira on Rocky Linux Server in our previous tutorial. In this article, We’ll learn […]

Atlassian created Jira, a bug tracking and agile project management application. Jira has a number of solutions and deployment choices […]

What is Google Cloud SDK? Google cloud sdk is a set of tools that enables you to manage your resources […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.