How to Install PhpMyAdmin on CentOS8

In this guide, we will demonstrate how phpmyadmin is installed on a CentOS 8 system. Phpmyadmin requires a standalone Database or as part of LAMP stack, installed and running on the system before hand.

Command to Install epel repository.

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

To Install remi repository.

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

To Install php-fedora-autoloader manully.

dnf install http://rpms.remirepo.net/enterprise/8/remi/x86_64/php-fedora-autoloader-1.0.0-5.el8.remi.noarch.rpm

And then install phpmyadmin

dnf install phpmyadmin

And restart the service.

service httpd restart

Edit file phpMyAdmin.conf

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

And replace at the top.

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       #Require ip 127.0.0.1
       #Require ip ::1
       Require all granted
     </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>
</Directory>

Enter it into your browser's address bar to check phpmyadmin is installed.

http://ip-address/phpmyadmin/

Output: