phpMyAdmin is a free and open-source MySQL web interface. phpMyAdmin is developed in PHP and distributed under GNU GPL 2 license. phpMyAdmin is a portable web application and due to this reason, it become one of the most popular MySQL administration tools, especially for web hosting services.
Database administrators and developers uses phpMyAdmin to perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; managing users and permissions; or monitoring database instances.
In this article, we are installing phpMyAdmin on CentOS 7 based LAMP server.
This article is about step by step installation of phpMyAdmin on CentOS 7 based LAMP Server. Hence, it does not address the usage and applications of phpMyAdmin web interface. Therefore, if you are interested to learn more about phpMyAdmin then you should read Mastering phpMyAdmin 3.4 for Effective MySQL Management by Packt Publishing.
Table of Contents:
- phpMyAdmin System Requirements
- Environment Specification
- Installing phpMyAdmin Prerequisite - MariaDB Server
- Installing phpMyAdmin Prerequisite - Apache HTTP Server
- Installing phpMyAdmin Prerequisite - PHP Support
- Installing phpMyAdmin on CentOS 7 LAMP Server
phpMyAdmin System Requirements:
According to phpMyAdmin documentation following software are required by phpMyAdmin.
- Database - MySQL / MariaDB 5.5 or later
- Web Server - Apache, Nginx, IIS, etc.
- PHP - PHP 7.1.3 or later
Environment Specification:
In this article, we are using the same CentOS 7 LAMP server, that we have configured in our previous post Install LAMP Stack on CentOS 7.
- Hostname – phpmyadmin-01.example.com
- IP Address – 192.168.116.191 / 24
- Operating System – CentOS 7.6
Installing phpMyAdmin Prerequisite - MariaDB Server:
Connect with phpmyadmin-01.example.com server using ssh as root user.
Required version of MariaDB 5.5 is available in CentOS 7 standard yum repositories. Therefore, we are installing it using yum command.
[root@phpmyadmin-01 ~]# yum install -y mariadb-server.x86_64
...
Installed:
mariadb-server.x86_64 1:5.5.60-1.el7_5
Dependency Installed:
mariadb.x86_64 1:5.5.60-1.el7_5
perl.x86_64 4:5.16.3-294.el7_6
perl-Carp.noarch 0:1.26-244.el7
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
perl-DBD-MySQL.x86_64 0:4.023-6.el7
perl-DBI.x86_64 0:1.627-4.el7
perl-Data-Dumper.x86_64 0:2.145-3.el7
perl-Encode.x86_64 0:2.51-7.el7
perl-Exporter.noarch 0:5.68-3.el7
perl-File-Path.noarch 0:2.09-2.el7
perl-File-Temp.noarch 0:0.23.01-3.el7
perl-Filter.x86_64 0:1.49-3.el7
perl-Getopt-Long.noarch 0:2.40-3.el7
perl-HTTP-Tiny.noarch 0:0.033-3.el7
perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PathTools.x86_64 0:3.40-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
perl-Pod-Escapes.noarch 1:1.04-294.el7_6
perl-Pod-Perldoc.noarch 0:3.20-4.el7
perl-Pod-Simple.noarch 1:3.28-4.el7
perl-Pod-Usage.noarch 0:1.63-3.el7
perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
perl-Socket.x86_64 0:2.010-4.el7
perl-Storable.x86_64 0:2.45-3.el7
perl-Text-ParseWords.noarch 0:3.29-4.el7
perl-Time-HiRes.x86_64 4:1.9725-3.el7
perl-Time-Local.noarch 0:1.2300-2.el7
perl-constant.noarch 0:1.27-2.el7
perl-libs.x86_64 4:5.16.3-294.el7_6
perl-macros.x86_64 4:5.16.3-294.el7_6
perl-parent.noarch 1:0.225-244.el7
perl-podlators.noarch 0:2.5.1-3.el7
perl-threads.x86_64 0:1.87-4.el7
perl-threads-shared.x86_64 0:1.43-6.el7
Complete!
Start and enable MariaDB service.
[root@phpmyadmin-01 ~]# systemctl enable --now mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Configure and secure MariaDB service as follows.
[root@phpmyadmin-01 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
MariaDB database has been installed on our CentOS 7 server. The password of root user, that we have set here will be used later to login on phpMyAdmin web interface.
Installing phpMyAdmin Prerequisite - Apache HTTP Server:
Apache HTTP server is also available in CentOS 7 official yum repositories. Therefore, we are installing Apache HTTP Server using yum command.
[root@phpmyadmin-01 ~]# yum install -y httpd.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-89.el7.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-89.el7.centos.1 for package: httpd-2.4.6-89.el7.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-89.el7.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-89.el7.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-89.el7.centos.1.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-89.el7.centos.1 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd x86_64 2.4.6-89.el7.centos.1 updates 2.7 M
Installing for dependencies:
apr x86_64 1.4.8-3.el7_4.1 base 103 k
apr-util x86_64 1.5.2-6.el7 base 92 k
httpd-tools x86_64 2.4.6-89.el7.centos.1 updates 91 k
mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 3.0 M
Installed size: 10 M
Downloading packages:
(1/5): apr-1.4.8-3.el7_4.1.x86_64.rpm | 103 kB 00:00
(2/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:01
(3/5): httpd-tools-2.4.6-89.el7.centos.1.x86_64.rpm | 91 kB 00:01
(4/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:01
(5/5): httpd-2.4.6-89.el7.centos.1.x86_64.rpm | 2.7 MB 00:02
--------------------------------------------------------------------------------
Total 1.0 MB/s | 3.0 MB 00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : apr-1.4.8-3.el7_4.1.x86_64 1/5
Installing : apr-util-1.5.2-6.el7.x86_64 2/5
Installing : httpd-tools-2.4.6-89.el7.centos.1.x86_64 3/5
Installing : mailcap-2.1.41-2.el7.noarch 4/5
Installing : httpd-2.4.6-89.el7.centos.1.x86_64 5/5
Verifying : httpd-2.4.6-89.el7.centos.1.x86_64 1/5
Verifying : mailcap-2.1.41-2.el7.noarch 2/5
Verifying : httpd-tools-2.4.6-89.el7.centos.1.x86_64 3/5
Verifying : apr-util-1.5.2-6.el7.x86_64 4/5
Verifying : apr-1.4.8-3.el7_4.1.x86_64 5/5
Installed:
httpd.x86_64 0:2.4.6-89.el7.centos.1
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7_4.1 apr-util.x86_64 0:1.5.2-6.el7
httpd-tools.x86_64 0:2.4.6-89.el7.centos.1 mailcap.noarch 0:2.1.41-2.el7
Complete!
Start and enable httpd.service.
[root@phpmyadmin-01 ~]# systemctl enable --now httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Allow HTTP service in Linux firewall.
[root@phpmyadmin-01 ~]# firewall-cmd --permanent --add-service=http
success
[root@phpmyadmin-01 ~]# firewall-cmd --reload
success
Apache HTTP server is installed on our CentOS 7 server.
Installing phpMyAdmin Prerequisite - PHP Support:
phpMyAdmin requires PHP 7.1.3 or later that is not available in CentOS 7 official yum repositories. Therefore, we have to install a third party yum repository for installing our required version of PHP.
We will use Remi yum repository to install PHP 7.1.3. But first, we have to install EPEL (Extra Packages for Enterprise Linux) because it is required by Remi yum repository.
[root@phpmyadmin-01 ~]# yum install -y epel-release.noarch
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
Install Remi yum repository as follows.
[root@phpmyadmin-01 ~]# rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Retrieving http://rpms.remirepo.net/enterprise/remi-release-7.rpm
warning: /var/tmp/rpm-tmp.wO9bgO: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:remi-release-7.6-2.el7.remi ################################# [100%]
Build cache for new yum repositories.
[root@phpmyadmin-01 ~]# yum makecache fast
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 5.8 kB 00:00
* base: ftp3.isra.edu.pk
* epel: mirror.xeonbd.com
* extras: ftp3.isra.edu.pk
* remi-safe: rpms.remirepo.net
* updates: ftp3.isra.edu.pk
base | 3.6 kB 00:00
epel | 5.3 kB 00:00
extras | 3.4 kB 00:00
remi-safe | 3.0 kB 00:00
updates | 3.4 kB 00:00
(1/4): epel/x86_64/group_gz | 88 kB 00:00
(2/4): remi-safe/primary_db | 1.6 MB 00:03
(3/4): epel/x86_64/primary_db | 6.8 MB 00:15
(4/4): epel/x86_64/updateinfo | 997 kB 00:35
Metadata Cache Created
Install PHP 7.2 and relevant packages.
[root@phpmyadmin-01 ~]# yum install -y php72-php php72-php-mysqlnd php72-php-gd php72-php-xml php72-php-mbstring
...
Installed:
php72-php.x86_64 0:7.2.21-1.el7.remi
php72-php-gd.x86_64 0:7.2.21-1.el7.remi
php72-php-mbstring.x86_64 0:7.2.21-1.el7.remi
php72-php-mysqlnd.x86_64 0:7.2.21-1.el7.remi
php72-php-xml.x86_64 0:7.2.21-1.el7.remi
Dependency Installed:
audit-libs-python.x86_64 0:2.8.4-4.el7
checkpolicy.x86_64 0:2.5-8.el7
dejavu-fonts-common.noarch 0:2.33-6.el7
dejavu-sans-fonts.noarch 0:2.33-6.el7
environment-modules.x86_64 0:3.2.10-10.el7
fontconfig.x86_64 0:2.13.0-4.3.el7
fontpackages-filesystem.noarch 0:1.44-8.el7
gd-last.x86_64 0:2.2.5-8.el7.remi
jbigkit-libs.x86_64 0:2.0-11.el7
libX11.x86_64 0:1.6.5-2.el7
libX11-common.noarch 0:1.6.5-2.el7
libXau.x86_64 0:1.0.8-2.1.el7
libXpm.x86_64 0:3.5.12-1.el7
libargon2.x86_64 0:20161029-3.el7
libcgroup.x86_64 0:0.41-20.el7
libjpeg-turbo.x86_64 0:1.2.90-6.el7
libsemanage-python.x86_64 0:2.5-14.el7
libtiff.x86_64 0:4.0.3-27.el7_3
libwebp7.x86_64 0:1.0.2-1.el7.remi
libxcb.x86_64 0:1.13-1.el7
oniguruma5.x86_64 0:6.9.2-2.el7.remi
php72-php-cli.x86_64 0:7.2.21-1.el7.remi
php72-php-common.x86_64 0:7.2.21-1.el7.remi
php72-php-json.x86_64 0:7.2.21-1.el7.remi
php72-php-pdo.x86_64 0:7.2.21-1.el7.remi
php72-runtime.x86_64 0:2.0-1.el7.remi
policycoreutils-python.x86_64 0:2.5-29.el7_6.1
python-IPy.noarch 0:0.75-6.el7
scl-utils.x86_64 0:20130529-19.el7
setools-libs.x86_64 0:3.3.8-4.el7
tcl.x86_64 1:8.5.13-8.el7
Dependency Updated:
policycoreutils.x86_64 0:2.5-29.el7_6.1
Complete!
PHP 7.2 and relevant packages has been installed on our CentOS 7 server.
We have successfully configured a CentOS 7 based LAMP server.
Installing phpMyAdmin on CentOS 7 LAMP Server:
phpMyAdmin 4.4 is available in EPEL yum repository. However, phpMyAdmin 5 has been released and available for download on their website.
If you want to use some exclusive features of phpMyAdmin 5 then you have to install it. Otherwise, phpMyAdmin 4.4 will serve the purpose of database administration as well.
Install phpMyAdmin using yum command.
[root@phpmyadmin-01 ~]# yum install -y phpmyadmin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* epel: my.fedora.ipserverone.com
* extras: ftp3.isra.edu.pk
* remi-safe: fr2.rpmfind.net
* updates: ftp3.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.4.15.10-3.el7 will be installed
--> Processing Dependency: php(language) >= 5.3.7 for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-gd >= 5.3.7 for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-mbstring >= 5.3.7 for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-mysqli >= 5.3.7 for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-bz2 for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-ctype for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-curl for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-date for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-filter for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-iconv for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-json for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-libxml for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-openssl for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-pcre for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-session for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-simplexml for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-spl for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-xmlwriter for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-zip for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-zlib for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-46.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-46.el7.x86_64
---> Package php-gd.x86_64 0:5.4.16-46.el7 will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-46.el7.x86_64
---> Package php-mbstring.x86_64 0:5.4.16-46.el7 will be installed
---> Package php-mysql.x86_64 0:5.4.16-46.el7 will be installed
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-46.el7 for package: php-mysql-5.4.16-46.el7.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
---> Package php-xml.x86_64 0:5.4.16-46.el7 will be installed
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package php-bcmath.x86_64 0:5.4.16-46.el7 will be installed
---> Package php-fedora-autoloader.noarch 0:1.0.0-1.el7 will be installed
---> Package php-pdo.x86_64 0:5.4.16-46.el7 will be installed
---> Package php-process.x86_64 0:5.4.16-46.el7 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
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
phpMyAdmin noarch 4.4.15.10-3.el7 epel 4.7 M
Installing for dependencies:
compat-libtidy x86_64 0.99.0-37.20091203.el7 epel 133 k
libzip x86_64 0.10.1-8.el7 base 48 k
php-bcmath x86_64 5.4.16-46.el7 base 58 k
php-common x86_64 5.4.16-46.el7 base 565 k
php-fedora-autoloader noarch 1.0.0-1.el7 epel 9.6 k
php-gd x86_64 5.4.16-46.el7 base 128 k
php-mbstring x86_64 5.4.16-46.el7 base 505 k
php-mysql x86_64 5.4.16-46.el7 base 101 k
php-pdo x86_64 5.4.16-46.el7 base 99 k
php-php-gettext noarch 1.0.12-1.el7 epel 23 k
php-process x86_64 5.4.16-46.el7 base 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.el7 base 126 k
t1lib x86_64 5.1.2-14.el7 base 166 k
Transaction Summary
================================================================================
Install 1 Package (+16 Dependent packages)
Total download size: 9.0 M
Installed size: 43 M
Downloading packages:
(1/17): libzip-0.10.1-8.el7.x86_64.rpm | 48 kB 00:00
(2/17): php-gd-5.4.16-46.el7.x86_64.rpm | 128 kB 00:00
(3/17): php-fedora-autoloader-1.0.0-1.el7.noarch.rpm | 9.6 kB 00:00
(4/17): compat-libtidy-0.99.0-37.20091203.el7.x86_64.rpm | 133 kB 00:01
(5/17): php-mbstring-5.4.16-46.el7.x86_64.rpm | 505 kB 00:01
(6/17): php-bcmath-5.4.16-46.el7.x86_64.rpm | 58 kB 00:01
(7/17): php-php-gettext-1.0.12-1.el7.noarch.rpm | 23 kB 00:00
(8/17): php-pdo-5.4.16-46.el7.x86_64.rpm | 99 kB 00:01
(9/17): php-mysql-5.4.16-46.el7.x86_64.rpm | 101 kB 00:02
(10/17): php-process-5.4.16-46.el7.x86_64.rpm | 56 kB 00:01
(11/17): php-common-5.4.16-46.el7.x86_64.rpm | 565 kB 00:03
(12/17): php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch.r | 257 kB 00:01
(13/17): php-tidy-5.4.16-9.el7.x86_64.rpm | 23 kB 00:00
(14/17): t1lib-5.1.2-14.el7.x86_64.rpm | 166 kB 00:01
(15/17): php-xml-5.4.16-46.el7.x86_64.rpm | 126 kB 00:02
(16/17): php-tcpdf-6.2.26-1.el7.noarch.rpm | 2.1 MB 00:07
(17/17): phpMyAdmin-4.4.15.10-3.el7.noarch.rpm | 4.7 MB 00:14
--------------------------------------------------------------------------------
Total 500 kB/s | 9.0 MB 00:18
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libzip-0.10.1-8.el7.x86_64 1/17
Installing : php-common-5.4.16-46.el7.x86_64 2/17
Installing : php-mbstring-5.4.16-46.el7.x86_64 3/17
Installing : php-xml-5.4.16-46.el7.x86_64 4/17
Installing : php-php-gettext-1.0.12-1.el7.noarch 5/17
Installing : php-fedora-autoloader-1.0.0-1.el7.noarch 6/17
Installing : php-bcmath-5.4.16-46.el7.x86_64 7/17
Installing : php-process-5.4.16-46.el7.x86_64 8/17
Installing : php-pdo-5.4.16-46.el7.x86_64 9/17
Installing : php-mysql-5.4.16-46.el7.x86_64 10/17
Installing : t1lib-5.1.2-14.el7.x86_64 11/17
Installing : php-gd-5.4.16-46.el7.x86_64 12/17
Installing : compat-libtidy-0.99.0-37.20091203.el7.x86_64 13/17
Installing : php-tidy-5.4.16-9.el7.x86_64 14/17
Installing : php-tcpdf-6.2.26-1.el7.noarch 15/17
Installing : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch 16/17
Installing : phpMyAdmin-4.4.15.10-3.el7.noarch 17/17
Verifying : php-tidy-5.4.16-9.el7.x86_64 1/17
Verifying : phpMyAdmin-4.4.15.10-3.el7.noarch 2/17
Verifying : php-fedora-autoloader-1.0.0-1.el7.noarch 3/17
Verifying : compat-libtidy-0.99.0-37.20091203.el7.x86_64 4/17
Verifying : php-tcpdf-6.2.26-1.el7.noarch 5/17
Verifying : php-bcmath-5.4.16-46.el7.x86_64 6/17
Verifying : php-mysql-5.4.16-46.el7.x86_64 7/17
Verifying : php-mbstring-5.4.16-46.el7.x86_64 8/17
Verifying : php-gd-5.4.16-46.el7.x86_64 9/17
Verifying : t1lib-5.1.2-14.el7.x86_64 10/17
Verifying : php-process-5.4.16-46.el7.x86_64 11/17
Verifying : libzip-0.10.1-8.el7.x86_64 12/17
Verifying : php-pdo-5.4.16-46.el7.x86_64 13/17
Verifying : php-common-5.4.16-46.el7.x86_64 14/17
Verifying : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch 15/17
Verifying : php-php-gettext-1.0.12-1.el7.noarch 16/17
Verifying : php-xml-5.4.16-46.el7.x86_64 17/17
Installed:
phpMyAdmin.noarch 0:4.4.15.10-3.el7
Dependency Installed:
compat-libtidy.x86_64 0:0.99.0-37.20091203.el7
libzip.x86_64 0:0.10.1-8.el7
php-bcmath.x86_64 0:5.4.16-46.el7
php-common.x86_64 0:5.4.16-46.el7
php-fedora-autoloader.noarch 0:1.0.0-1.el7
php-gd.x86_64 0:5.4.16-46.el7
php-mbstring.x86_64 0:5.4.16-46.el7
php-mysql.x86_64 0:5.4.16-46.el7
php-pdo.x86_64 0:5.4.16-46.el7
php-php-gettext.noarch 0:1.0.12-1.el7
php-process.x86_64 0:5.4.16-46.el7
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.el7
t1lib.x86_64 0:5.1.2-14.el7
Complete!
phpMyAdmin created it's configuration in Apache HTTP server at /etc/httpd/conf.d/phpMyAdmin.conf.
By using Apache Access Control, phpMyAdmin only allows access by localhost in its default configurations.
Therefore, we need to edit it to allow access by other network systems.
[root@phpmyadmin-01 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
In following directive, Add a configuration below as highlighted in yellow color.
<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 ip 192.168.116
</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>
Restart httpd.service to apply changes.
[root@phpmyadmin-01 ~]# systemctl restart httpd.service
Browse URL http://phpmyadmin-01.example.com/phpmyadmin in client's browser.
Login using MariaDB database credentials. We are login as root user here.
We are now at the phpMyAdmin dashboard.
The only databases are visible here on which user has permissions.
Since, root is the super-user of MariaDB server, therefore, it can see all databases on the server.
phpMyAdmin has been installed on our CentOS 7 LAMP server.
No comments:
Post a Comment