• WordPress
  • cPanel
  • Softaculous
  • KVM Virtualization
  • Vmware Virtualization
  • Proxmox
Monday, May 12, 2025
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
No Result
View All Result
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux

How to Install phpMyAdmin on Rocky Linux

in Linux OS, Red Hat Enterprise Linux, Rocky Linux
How to Install phpMyAdmin on Rocky Linux

phpMyAdmin is a popular web-based tool used for managing MySQL and MariaDB databases. It provides an intuitive and easy-to-use interface that makes database management tasks simple and efficient. In this tutorial, we will guide you through the process of how to install phpMyAdmin on your Rocky Linux system.

Prerequisites

Before we begin, ensure that you have the following:

  1. A Rocky Linux system with a LAMP stack installed. If you haven’t installed it yet, follow our guide on how to install and configure LAMP stack on Rocky Linux.
  2. A user with sudo privileges.

How to Install phpMyAdmin on Rocky Linux

Install EPEL Repository

phpMyAdmin is not available in the default Rocky Linux repositories, so we need to install the Extra Packages for Enterprise Linux (EPEL) repository first:

sudo dnf install epel-release -y

Install phpMyAdmin

With the EPEL repository enabled, you can now install phpMyAdmin:

sudo dnf install phpmyadmin -y

Configure phpMyAdmin

To access phpMyAdmin securely, we need to make a few changes to its configuration file:

  1. Open the configuration file:
sudo vim /etc/httpd/conf.d/phpMyAdmin.conf
  1. Find the following lines:
<RequireAny>
    Require ip 127.0.0.1
    Require ip ::1
</RequireAny>
  1. Replace the IP addresses with your system’s IP address or a range of IP addresses that should be allowed to access phpMyAdmin. For example:
<RequireAny>
    Require ip 192.168.1.0/24
    Require ip ::1
</RequireAny>
  1. Save the changes and exit the editor.
  2. Restart the Apache web server for the changes to take effect:
sudo systemctl restart httpd

Secure phpMyAdmin with a Password

To further enhance security, let’s create a password-protected directory for phpMyAdmin:

  1. Install the httpd-tools package:
sudo dnf install httpd-tools -y
  1. Create a password file for the user you want to grant access to phpMyAdmin (replace {username} with your desired username):
sudo htpasswd -c /etc/httpd/.htpasswd {username}
  1. Enter the password for the user when prompted.
  2. Update the phpMyAdmin configuration file to include the password file:
sudo vim /etc/httpd/conf.d/phpMyAdmin.conf
  1. Add the following lines inside the <Directory /usr/share/phpMyAdmin> section:
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/httpd/.htpasswd
Require valid-user
  1. Save the changes and exit the editor.
  2. Restart the Apache web server:
sudo systemctl restart httpd

Access phpMyAdmin

Now you can access phpMyAdmin in your web browser by navigating to http://{your-server-ip}/phpMyAdmin. Enter the username and password you created earlier, and you’ll be logged in to phpMyAdmin.

That’s it! You’ve successfully installed and secured phpMyAdmin on your Rocky Linux system. You can now manage your databases with ease. For more tutorials and guides on Rocky Linux, feel free to explore the following articles:

  • How to install Git on Rocky Linux
  • How to change SSH port on Rocky Linux
  • How to install Vim on Rocky Linux
  • How to install Ruby on Rocky Linux
  • How to set up an OpenVPN server on Rocky Linux

Remember that securing your server is essential to protect your data and ensure smooth operation. We hope this tutorial has helped you in setting up phpMyAdmin on Rocky Linux, and we encourage you to explore more about this powerful and versatile operating system. If you have any questions or need further assistance, don’t hesitate to reach out to the community or consult the official documentation for more information.

ShareTweet
Previous Post

How to Install Git on Rocky Linux

Next Post

How to Install PHP on Rocky Linux

Related Posts

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

Set up FreeIPA on Rocky Linux

How to Install and Configure FreeIPA on Rocky Linux

Leave a Reply Cancel reply

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

Golden Host VPS
  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.

  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.