MongoDB is a NoSQL database server with a command-line shell interface, however, to manage with GUI, we can install MongoDB Compass on Rocky Linux or AlmaLinux 8 using the terminal. It is a good alternative to the MongoDB shell for querying, aggregating, and analyzing databases.
Unlike MySQL, MariaDB, and other SQL; MongoDB is a NoSQL document-oriented database. Relational database technologies use rows, columns, and tables to store data. This makes them rigid quickly, slowly, and nearly impossible to manage; just imagine Microsoft Excel. Compared to database systems like MySQL, the structure of the data is not determined per table, but per entry, which gives me greater flexibility. Its name comes from humongous. MongoDB is also one of the most popular databases among developers.
It was developed to offer more flexibility and scalability for data storage and use. The JSON document model enables developers to work more intuitively and thus more productively with data. MongoDB’s dynamic schema makes it easy to display semi-structured and polymorphic data, as the documents do not all have to have the same fields.
It is available as a Community version which is free to install and use, whereas the Enterprise version with support and more advanced features needs a subscription.
Just like MySQL Workbench or phpMyAdmin which makes the management of databases easy; in the same way, an official graphical user interface for MongoDB called Compass is also available on its official website of it to install. It allows uses to easily create, manage, update and delete database tables including running queries. It is available for of cost for macOS, Windows, and Linux.
Steps to Install MongoDB Compass GUI on AlmaLinux or Rocky Linux 8
1. Download MongoDB Compass
Well, we cannot download Compass directly using the DNF packager manager of ALmaLinux or Rocky Linux, hence we have to download it by visiting its official website. Open the browser and follow the preceding link.
- Select Latest Version of MongoDB COmpass
- Operating system RedHat
- Packages- RPM
- Click on the Download Button.
Note: We can also get the file directly using the Command terminal, for that instead of the Download button and click on “Copy link” and then use it with wget
as a given example in the terminal.
wget paste-link
Example:
wget https://downloads.mongodb.com/compass/mongodb-compass-1.29.6.x86_64.rpm
2. Install MongoDB Compass on Rocky Linux or AlmaLinux
If you have downloaded the Compass using the browser then we have to switch to the Downloads directory first. Where the users who have used the Terminal can simply run the installation command in the same directory where they have downloaded the RPM file of this tool.
To check whether the file is available in your current directory use:
ls
To install:
sudo dnf install ./mongodb-compass-*.x86_64.rpm
3. Start MongoDB Compass software
Once the installation is completed go to Activities and search for the Compass, as its icon appears, click to run the same.
4. Connect local or remote MongoDB database server
Once you have Compass’s graphical user interface then simply click on the “Connect” button to connect the MongoDB Database server installed on your local system where Compass is running. Whereas for the database server running on some remote computer, click on “Fill in connection fields individually“.
Note: See this tutorial, if you want to install MongoDB server in your local Rocky or Almalinux 8.
For remote MongoDB, add the remote server details such as server address, username, and password.
5. Graphical user interface for Database management
6. Create Database using compass GUI
Although when you are on the graphical user interface of Compass it is easy to start, however, let’s see some glimpse of the steps to create, edit or delete a database.
On the GUI, click on the “Create Database” button.
After that give some name to your Database and collection.
7. Import Data
To import data into the created database either add the entries manually or upload using JSON or Document file.
Hit the Import button.
All the Table entries will show on the MongoDB compass interface.
8. Delete Database
To delete any created or imported database, simply click on the Bin icon.
Other Articles:
• Install MongoDB Compass GUI in Ubuntu 20.04 LTS Linux
• How to install MongoDB 5.0 Server on Debian 11 Bullseye
• How to install MongoDB Server on Alpine Linux
• Install MongoDB Server on Linux mint 18 | 19 | 20