preloader

How to install the MongoDB GUI Adminer on AlmaLinux – TechRepublic

Register for your free TechRepublic membership or if you are already a member, sign in using your preferred method below.
We recently updated our Terms and Conditions for TechRepublic Premium. By clicking continue, you agree to these updated terms.
Invalid email/username and password combination supplied.
An email has been sent to you with instructions on how to reset your password.
By registering, you agree to the Terms of Use and acknowledge the data practices outlined in the Privacy Policy.
You will also receive a complimentary subscription to TechRepublic’s News and Special Offers newsletter and the Top Story of the Day newsletter. You may unsubscribe from these newsletters at any time.
Username must be unique. Password must be a minimum of 6 characters and have any 3 of the 4 items: a number (0 through 9), a special character (such as !, $, #, %), an uppercase character (A through Z) or a lowercase (a through z) character (no spaces).
How to install the MongoDB GUI Adminer on AlmaLinux
Your email has been sent
Need a simple-to-use GUI to help manage your MongoDB databases? Jack Wallen shows you how to install Adminer for just that purpose.
MongoDB is a NoSQL database that is a great option for those needing to store massive amounts of data for highly available, scalable applications and services. Out of the box, MongoDB is managed entirely from the command line. For some database admins, that’s a fine option but for those who prefer GUI tools to take care of database management, where do you turn for this document-based platform?
SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
One option is Adminer, which is similar to phpMyAdmin in that it’s a simple graphical interface for administering databases. Adminer doesn’t have the most modern-looking UI, but it does make the task of working with your MongoDB databases considerably easier.
I want to show you how easy it is to get Adminer up and running on AlmaLinux.
The only thing you’ll need to install Adminer on AlmaLinux is a running instance of the operating system and a user with sudo privileges.
If your instance of AlmaLinux doesn’t already have MongoDB installed, let’s do that now. Log into your server and create a new repository file with:
sudo nano /etc/yum.repos.d/mongodb.repo
In that file, paste the following:
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
Save and close the file.
Install MongoDB with:
sudo dnf install mongodb-org -y
Start and enable the service with:
sudo systemctl enable --now mongod
You’re now ready to install Adminer.
First, we’ll add the necessary dependencies with the command:
dnf install httpd mariadb-server php php-mysqli php-curl php-json -y
Start and enable MariaDB with:
sudo systemctl enable --now mariadb
Secure the MariaDB installation with the command:
sudo secure_mysql_installation
Make sure to set a new password for the admin user and then answer Y to the remaining questions.
Log in to the MariaDB console with:
sudo mysql -u root -p
Create a new database with:
CREATE DATABASE adminer;
Add a new user with the command:
CREATE USER 'adminer'@'localhost' IDENTIFIED BY 'PASSWORD';
Where PASSWORD is a strong/unique password.
Grant the necessary permissions with:
GRANT ALL ON adminer.* TO 'adminer'@'localhost';
Flush the permissions and exit from the database console with:
FLUSH PRIVILEGES;
exit
Create a new directory to house Adminer with the command:
sudo mkdir /var/www/html/adminer
Change into that newly created directory with:
cd /var/www/html/adminer
Download Adminer with:
sudo wget -O index.php https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php
Make sure to visit the Adminer site to check that you’ve downloaded the latest version.
Give the directory the proper permissions with the following commands:
sudo chown -R apache:apache /var/www/html/adminer/
sudo chmod -R 775 /var/www/html/adminer/
Next, we need to create an Apache configuration file with the command:
sudo nano /etc/httpd/conf.d/adminer.conf
In that file, paste the following:
<VirtualHost *:80>
ServerAdmin admin@exampledomain.com
DocumentRoot /var/www/html/adminer/
ServerName adminer.exampledomain.com
DirectoryIndex index.php
ErrorLog /var/log/httpd/adminer-error.log
CustomLog /var/log/httpd/adminer-access.log combined
</VirtualHost>
Restart Apache with:
sudo systemctl restart httpd
Open a web browser and point it to http://SERVER (where SERVER is the IP address or domain of the hosting server). You’ll be presented with a login screen (Figure A).
Figure A
You’ll use the credentials and database name we created earlier, so adminer for the user, the password you created, and adminer for the database name. Once you’ve logged in, you should see the main window that allows you to manage that database (Figure B).
Figure B
And that’s all there is to installing the Adminer MongoDB GUI application on AlmaLinux. It shouldn’t take you much time to get comfortable with using this tool.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
You don’t want to miss our tips, tutorials, and commentary on the Linux OS and open source applications.
How to install the MongoDB GUI Adminer on AlmaLinux
Your email has been sent
Your message has been sent
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.
These 11 cloud-to-cloud solutions back up your organization’s data so you’ll be covered in the event of deletions, malware or outages. Compare the best online cloud backup services now.
You can use a mobile device to speak with another person directly through the Teams app. Lance Whitney shows you how to use this handy feature.
A phishing technique called Browser in the Browser (BITB) has emerged, and it’s already aiming at government entities, including Ukraine. Find out how to protect against this new threat.
With so many project management software options to choose from, it can seem daunting to find the right one for your projects or company. We’ve narrowed them down to these nine.
Start-ups, DARPA and Accenture Ventures announce research partnerships, new hardware and strategic investments.
Procuring software packages for an organization is a complicated process that involves more than just technological knowledge. There are financial and support aspects to consider, proof of concepts to evaluate and vendor negotiations to handle. Navigating through the details of an RFP alone can be challenging, so use TechRepublic Premium’s Software Procurement Policy to establish …
Recruiting a Security Analyst with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, recruit and hire the best candidates for a …
Recruiting a DevOps engineer with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, recruit and hire the best candidates for a …
Video game writing jobs are in demand. Recruiting a video game/quest writer with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, …

source

Related Post

Leave a Reply

Your email address will not be published.

Translate »