Installing phpMyAdmin on CentOS 7

Prerequisites

In order to be able to install phpMyAdmin, you have to first be sure you’ve completed these three installations:

  • PHP
  • EPEL (Extra Packages for Enterprise Linux) repository
  • MySQL (MariaDB)

If you’ve been following the articles then You must be ok to proceed with the installation of phpMyAdmin.

Installing phpMyAdmin

You can start the installation of phpMyAdmin using the following CLI command.

yum install phpmyadmin
installation of phpMyAdmin

phpMyAdmin installation log

If you want to check exactly what was installed here you are the phpMyAdmin installation log.

[root@centos7 ~]# yum install phpmyadmin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                     |  54 kB  00:00:00     
 * base: mirror.espoch.edu.ec
 * epel: mirrors.liquidweb.com
 * extras: mirror.espoch.edu.ec
 * updates: mirror.ufam.edu.br
base                                                                     | 3.6 kB  00:00:00     
epel                                                                     | 5.3 kB  00:00:00     
extras                                                                   | 2.9 kB  00:00:00     
updates                                                                  | 2.9 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                              |  90 kB  00:00:16     
(2/3): epel/x86_64/updateinfo                                            | 1.0 MB  00:00:18     
(3/3): epel/x86_64/primary_db                                            | 6.7 MB  00:00:21     
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.4.15.10-4.el7 will be installed
--> Processing Dependency: php(language) >= 5.3.7 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-gd >= 5.3.7 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-mbstring >= 5.3.7 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-mysqli >= 5.3.7 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-bz2 for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-ctype for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-curl for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-date for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-filter for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-iconv for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-json for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-libxml for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-openssl for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-pcre for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-session for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-simplexml for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-spl for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-xmlwriter for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-zip for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Processing Dependency: php-zlib for package: phpMyAdmin-4.4.15.10-4.el7.noarch
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-46.1.el7_7.x86_64
---> Package php-gd.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for package: php-gd-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: php-gd-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: php-gd-5.4.16-46.1.el7_7.x86_64
---> Package php-mbstring.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-mysql.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-46.1.el7_7 for package: php-mysql-5.4.16-46.1.el7_7.x86_64
---> Package php-php-gettext.noarch 0:1.0.12-1.el7 will be installed
---> Package php-tcpdf.noarch 0:6.2.26-1.el7 will be installed
--> Processing Dependency: php-bcmath for package: php-tcpdf-6.2.26-1.el7.noarch
--> Processing Dependency: php-composer(fedora/autoloader) for package: php-tcpdf-6.2.26-1.el7.noarch
--> Processing Dependency: php-posix for package: php-tcpdf-6.2.26-1.el7.noarch
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.26-1.el7.noarch
---> Package php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.26-1.el7 will be installed
--> Processing Dependency: dejavu-sans-fonts for package: php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch
---> Package php-xml.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.4.16-46.1.el7_7.x86_64
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.el7.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.el7 will be installed
---> Package libjpeg-turbo.x86_64 0:1.2.90-8.el7 will be installed
---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package php-bcmath.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-fedora-autoloader.noarch 0:1.0.1-2.el7 will be installed
---> Package php-pdo.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-process.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-tidy.x86_64 0:5.4.16-9.el7 will be installed
--> Processing Dependency: libtidy-0.99.so.0()(64bit) for package: php-tidy-5.4.16-9.el7.x86_64
---> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
--> Running transaction check
---> Package compat-libtidy.x86_64 0:0.99.0-37.20091203.el7 will be installed
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: dejavu-fonts-common-2.33-6.el7.noarch
---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
--> Running transaction check
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================
 Package                          Arch        Version                        Repository    Size
================================================================================================
Installing:
 phpMyAdmin                       noarch      4.4.15.10-4.el7                epel         4.7 M
Installing for dependencies:
 compat-libtidy                   x86_64      0.99.0-37.20091203.el7         epel         133 k
 dejavu-fonts-common              noarch      2.33-6.el7                     base          64 k
 dejavu-sans-fonts                noarch      2.33-6.el7                     base         1.4 M
 fontpackages-filesystem          noarch      1.44-8.el7                     base         9.9 k
 libX11                           x86_64      1.6.7-2.el7                    base         607 k
 libX11-common                    noarch      1.6.7-2.el7                    base         164 k
 libXau                           x86_64      1.0.8-2.1.el7                  base          29 k
 libXpm                           x86_64      3.5.12-1.el7                   base          55 k
 libjpeg-turbo                    x86_64      1.2.90-8.el7                   base         135 k
 libxcb                           x86_64      1.13-1.el7                     base         214 k
 libxslt                          x86_64      1.1.28-5.el7                   base         242 k
 libzip                           x86_64      0.10.1-8.el7                   base          48 k
 php-bcmath                       x86_64      5.4.16-46.1.el7_7              updates       58 k
 php-common                       x86_64      5.4.16-46.1.el7_7              updates      565 k
 php-fedora-autoloader            noarch      1.0.1-2.el7                    epel          11 k
 php-gd                           x86_64      5.4.16-46.1.el7_7              updates      128 k
 php-mbstring                     x86_64      5.4.16-46.1.el7_7              updates      505 k
 php-mysql                        x86_64      5.4.16-46.1.el7_7              updates      101 k
 php-pdo                          x86_64      5.4.16-46.1.el7_7              updates       99 k
 php-php-gettext                  noarch      1.0.12-1.el7                   epel          23 k
 php-process                      x86_64      5.4.16-46.1.el7_7              updates       56 k
 php-tcpdf                        noarch      6.2.26-1.el7                   epel         2.1 M
 php-tcpdf-dejavu-sans-fonts      noarch      6.2.26-1.el7                   epel         257 k
 php-tidy                         x86_64      5.4.16-9.el7                   epel          23 k
 php-xml                          x86_64      5.4.16-46.1.el7_7              updates      126 k
 t1lib                            x86_64      5.1.2-14.el7                   base         166 k

Transaction Summary
================================================================================================
Install  1 Package (+26 Dependent packages)

Total download size: 12 M
Installed size: 53 M
Is this ok [y/d/N]: y
Downloading packages:
(1/27): dejavu-fonts-common-2.33-6.el7.noarch.rpm                        |  64 kB  00:00:15     
(2/27): fontpackages-filesystem-1.44-8.el7.noarch.rpm                    | 9.9 kB  00:00:00     
(3/27): dejavu-sans-fonts-2.33-6.el7.noarch.rpm                          | 1.4 MB  00:00:16     
(4/27): libX11-common-1.6.7-2.el7.noarch.rpm                             | 164 kB  00:00:00     
(5/27): libX11-1.6.7-2.el7.x86_64.rpm                                    | 607 kB  00:00:00     
(6/27): libXau-1.0.8-2.1.el7.x86_64.rpm                                  |  29 kB  00:00:00     
(7/27): libXpm-3.5.12-1.el7.x86_64.rpm                                   |  55 kB  00:00:00     
(8/27): libjpeg-turbo-1.2.90-8.el7.x86_64.rpm                            | 135 kB  00:00:00     
(9/27): libxcb-1.13-1.el7.x86_64.rpm                                     | 214 kB  00:00:00     
(10/27): libxslt-1.1.28-5.el7.x86_64.rpm                                 | 242 kB  00:00:00     
(11/27): libzip-0.10.1-8.el7.x86_64.rpm                                  |  48 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/compat-libtidy-0.99.0-37.20091203.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for compat-libtidy-0.99.0-37.20091203.el7.x86_64.rpm is not installed
(12/27): compat-libtidy-0.99.0-37.20091203.el7.x86_64.rpm                | 133 kB  00:00:16     
(13/27): php-bcmath-5.4.16-46.1.el7_7.x86_64.rpm                         |  58 kB  00:00:15     
(14/27): php-common-5.4.16-46.1.el7_7.x86_64.rpm                         | 565 kB  00:00:15     
(15/27): php-fedora-autoloader-1.0.1-2.el7.noarch.rpm                    |  11 kB  00:00:15     
(16/27): php-gd-5.4.16-46.1.el7_7.x86_64.rpm                             | 128 kB  00:00:00     
(17/27): php-mbstring-5.4.16-46.1.el7_7.x86_64.rpm                       | 505 kB  00:00:00     
(18/27): php-mysql-5.4.16-46.1.el7_7.x86_64.rpm                          | 101 kB  00:00:00     
(19/27): php-pdo-5.4.16-46.1.el7_7.x86_64.rpm                            |  99 kB  00:00:00     
(20/27): php-process-5.4.16-46.1.el7_7.x86_64.rpm                        |  56 kB  00:00:00     
(21/27): php-xml-5.4.16-46.1.el7_7.x86_64.rpm                            | 126 kB  00:00:00     
(22/27): php-php-gettext-1.0.12-1.el7.noarch.rpm                         |  23 kB  00:00:00     
(23/27): t1lib-5.1.2-14.el7.x86_64.rpm                                   | 166 kB  00:00:00     
(24/27): php-tcpdf-6.2.26-1.el7.noarch.rpm                               | 2.1 MB  00:00:01     
(25/27): php-tidy-5.4.16-9.el7.x86_64.rpm                                |  23 kB  00:00:16     
(26/27): php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch.rpm             | 257 kB  00:00:17     
(27/27): phpMyAdmin-4.4.15.10-4.el7.noarch.rpm                           | 4.7 MB  00:00:32     
------------------------------------------------------------------------------------------------
Total                                                           187 kB/s |  12 MB  00:01:05     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libzip-0.10.1-8.el7.x86_64                                                  1/27 
  Installing : php-common-5.4.16-46.1.el7_7.x86_64                                         2/27 
  Installing : php-mbstring-5.4.16-46.1.el7_7.x86_64                                       3/27 
  Installing : php-php-gettext-1.0.12-1.el7.noarch                                         4/27 
  Installing : php-process-5.4.16-46.1.el7_7.x86_64                                        5/27 
  Installing : php-bcmath-5.4.16-46.1.el7_7.x86_64                                         6/27 
  Installing : php-fedora-autoloader-1.0.1-2.el7.noarch                                    7/27 
  Installing : php-pdo-5.4.16-46.1.el7_7.x86_64                                            8/27 
  Installing : php-mysql-5.4.16-46.1.el7_7.x86_64                                          9/27 
  Installing : libXau-1.0.8-2.1.el7.x86_64                                                10/27 
  Installing : libxcb-1.13-1.el7.x86_64                                                   11/27 
  Installing : libxslt-1.1.28-5.el7.x86_64                                                12/27 
  Installing : php-xml-5.4.16-46.1.el7_7.x86_64                                           13/27 
  Installing : compat-libtidy-0.99.0-37.20091203.el7.x86_64                               14/27 
  Installing : php-tidy-5.4.16-9.el7.x86_64                                               15/27 
  Installing : libjpeg-turbo-1.2.90-8.el7.x86_64                                          16/27 
  Installing : libX11-common-1.6.7-2.el7.noarch                                           17/27 
  Installing : libX11-1.6.7-2.el7.x86_64                                                  18/27 
  Installing : t1lib-5.1.2-14.el7.x86_64                                                  19/27 
  Installing : libXpm-3.5.12-1.el7.x86_64                                                 20/27 
  Installing : php-gd-5.4.16-46.1.el7_7.x86_64                                            21/27 
  Installing : php-tcpdf-6.2.26-1.el7.noarch                                              22/27 
  Installing : fontpackages-filesystem-1.44-8.el7.noarch                                  23/27 
  Installing : dejavu-fonts-common-2.33-6.el7.noarch                                      24/27 
  Installing : dejavu-sans-fonts-2.33-6.el7.noarch                                        25/27 
  Installing : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch                            26/27 
  Installing : phpMyAdmin-4.4.15.10-4.el7.noarch                                          27/27 
  Verifying  : phpMyAdmin-4.4.15.10-4.el7.noarch                                           1/27 
  Verifying  : php-process-5.4.16-46.1.el7_7.x86_64                                        2/27 
  Verifying  : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch                             3/27 
  Verifying  : php-bcmath-5.4.16-46.1.el7_7.x86_64                                         4/27 
  Verifying  : fontpackages-filesystem-1.44-8.el7.noarch                                   5/27 
  Verifying  : dejavu-fonts-common-2.33-6.el7.noarch                                       6/27 
  Verifying  : t1lib-5.1.2-14.el7.x86_64                                                   7/27 
  Verifying  : libX11-1.6.7-2.el7.x86_64                                                   8/27 
  Verifying  : libX11-common-1.6.7-2.el7.noarch                                            9/27 
  Verifying  : libxcb-1.13-1.el7.x86_64                                                   10/27 
  Verifying  : php-common-5.4.16-46.1.el7_7.x86_64                                        11/27 
  Verifying  : libXpm-3.5.12-1.el7.x86_64                                                 12/27 
  Verifying  : libjpeg-turbo-1.2.90-8.el7.x86_64                                          13/27 
  Verifying  : compat-libtidy-0.99.0-37.20091203.el7.x86_64                               14/27 
  Verifying  : php-tcpdf-6.2.26-1.el7.noarch                                              15/27 
  Verifying  : libxslt-1.1.28-5.el7.x86_64                                                16/27 
  Verifying  : php-fedora-autoloader-1.0.1-2.el7.noarch                                   17/27 
  Verifying  : dejavu-sans-fonts-2.33-6.el7.noarch                                        18/27 
  Verifying  : php-mysql-5.4.16-46.1.el7_7.x86_64                                         19/27 
  Verifying  : php-tidy-5.4.16-9.el7.x86_64                                               20/27 
  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                21/27 
  Verifying  : php-xml-5.4.16-46.1.el7_7.x86_64                                           22/27 
  Verifying  : libzip-0.10.1-8.el7.x86_64                                                 23/27 
  Verifying  : php-mbstring-5.4.16-46.1.el7_7.x86_64                                      24/27 
  Verifying  : php-php-gettext-1.0.12-1.el7.noarch                                        25/27 
  Verifying  : php-gd-5.4.16-46.1.el7_7.x86_64                                            26/27 
  Verifying  : php-pdo-5.4.16-46.1.el7_7.x86_64                                           27/27 

Installed:
  phpMyAdmin.noarch 0:4.4.15.10-4.el7                                                           

Dependency Installed:
  compat-libtidy.x86_64 0:0.99.0-37.20091203.el7    dejavu-fonts-common.noarch 0:2.33-6.el7    
  dejavu-sans-fonts.noarch 0:2.33-6.el7             fontpackages-filesystem.noarch 0:1.44-8.el7
  libX11.x86_64 0:1.6.7-2.el7                       libX11-common.noarch 0:1.6.7-2.el7         
  libXau.x86_64 0:1.0.8-2.1.el7                     libXpm.x86_64 0:3.5.12-1.el7               
  libjpeg-turbo.x86_64 0:1.2.90-8.el7               libxcb.x86_64 0:1.13-1.el7                 
  libxslt.x86_64 0:1.1.28-5.el7                     libzip.x86_64 0:0.10.1-8.el7               
  php-bcmath.x86_64 0:5.4.16-46.1.el7_7             php-common.x86_64 0:5.4.16-46.1.el7_7      
  php-fedora-autoloader.noarch 0:1.0.1-2.el7        php-gd.x86_64 0:5.4.16-46.1.el7_7          
  php-mbstring.x86_64 0:5.4.16-46.1.el7_7           php-mysql.x86_64 0:5.4.16-46.1.el7_7       
  php-pdo.x86_64 0:5.4.16-46.1.el7_7                php-php-gettext.noarch 0:1.0.12-1.el7      
  php-process.x86_64 0:5.4.16-46.1.el7_7            php-tcpdf.noarch 0:6.2.26-1.el7            
  php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.26-1.el7 php-tidy.x86_64 0:5.4.16-9.el7             
  php-xml.x86_64 0:5.4.16-46.1.el7_7                t1lib.x86_64 0:5.1.2-14.el7                

Complete!

Configuring phpMyAdmin

Before you can access phpMyAdmin from a web browser you must add the IP Address of your computer into the phpMyAdmin configuration file that is called “phpMyAdmin.conf” and is located at the following location.

/etc/httpd/conf.d

The animation below shows how easy is to open and modify the “phpMyAdmin.conf” file using the bookmark tool provided by WinSCP, if you need help on how to configure bookmarks on WinSCP you can take a look at this article.

Opening phpMyAdmin.conf using WinSCP

If you are working on a Windows machine you can check your IP Address using the following CLI command.

ipconfig /all

Once you know the IP Address of your computer you must add it as shown in the following image.

Adding your Computer’s IP Address to phpMyAdmin.conf

Restart Apache

Once the change has been completed you must restart Apache web server for the changes to be recongnized, and for that you can use the following CLI command.

systemctl restart httpd.service
restarting Apache web server

Checking Apache status

You can check the current status of Apache web server using the following CLI command.

systemctl status httpd.service

Where to go next?

Now that you’ve successfully installed phpMyAdmin you are ready to start managing your Databases taking advantage of the friendly GUI provided by this powerful tool.