Posted By Shahid Malla

Simple Guide: Installing phpMyAdmin on AlmaLinux, Rocky Linux, and Ubuntu 2024 - Shahid Malla - WHMCS Expert Freelancer

Simple guide on how to install phpMyAdmin on AlmaLinux, Rocky Linux, and Ubuntu. phpMyAdmin is a web-based database management tool that is widely used for MySQL and MariaDB databases.

For AlmaLinux and Rocky Linux:

Step 1: Install EPEL Repository

sudo dnf install epel-release

Step 2: Install phpMyAdmin

sudo dnf install phpMyAdmin

Step 3: Configure phpMyAdmin

Edit the phpMyAdmin configuration file:

sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

Find and replace the following lines:

<IfModule mod_authz_core.c>
    # Apache 2.4
    <RequireAny>
        Require ip 127.0.0.1
        Require ip ::1
    </RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from All
    Allow from 127.0.0.1
    Allow from ::1
</IfModule>

Save the file and restart Apache:

sudo systemctl restart httpd

Step 4: Access phpMyAdmin

Open your browser and navigate to http://your_server_ip/phpMyAdmin. Log in with your MySQL/MariaDB username and password.

For Ubuntu:

Step 1: Install phpMyAdmin

sudo apt update
sudo apt install phpmyadmin

During the installation, you will be prompted to choose a web server. Select apache2 using the spacebar and press Enter.

Step 2: Configure phpMyAdmin

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

Add the following lines at the end:

<Directory /usr/share/phpmyadmin>
    Options SymLinksIfOwnerMatch
    DirectoryIndex index.php
</Directory>

Save the file and enable the configuration:

sudo a2enconf phpmyadmin
sudo systemctl restart apache2

Step 3: Access phpMyAdmin

Open your browser and navigate to http://your_server_ip/phpmyadmin. Log in with your MySQL/MariaDB username and password.

Conclusion:

You have successfully installed phpMyAdmin on AlmaLinux, Rocky Linux, and Ubuntu. Use phpMyAdmin to manage your MySQL or MariaDB databases through an easy-to-use web interface. Keep your phpMyAdmin installation up-to-date for security reasons.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x