Yum 安装 PhpMyAdmin 最新版



PhpMyAdmin is a well most popular web-based client for managing MySQL server. PHPMyAdmin is written in PHP programming language. It provides a user-friendly web interface to access and manage your databases. To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages. This article will help you to install phpMyAdmin on CentOS/RedHat System.


In order to use PHPMyAdmin, you must have PHP, MySQL and Apache installed on your system. Also, you need PHP-MySQL or PHP-MySQLi module enabled in PHP configuration. For the current version of PHPMyAdmin 4.7.2, the requirements are as follows.

  • Apache >= 2.2
  • PHP >= 5.5
  • MySQL/MariaDB >= 5.5

Use the tutorial: Installing Apache MySQL PHP on CentOS and RedHat

Enable Remi Repository

phpMyAdmin most updated package is available under Remi repository. Install it in your system using following commands.

CentOS/RHEL 7:
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

CentOS/RHEL 6:
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Fedora 26:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-26.rpm

Fedora 25:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-25.rpm

Fedora 24:
# rpm -Uvh http://rpms.famillecollet.com/remi-release-24.rpm

Install PhpMyAdmin

After enabling Remi repository on your system, let’s start the with the installation of phpMyAdmin using yum package manager. All the dependencies will automatically be installed.

# yum --enablerepo=remi,remi-test  install phpMyAdmin

Configure PhpMyAdmin

phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit /etc/httpd/conf.d/phpMyAdmin.conf and update all with your network like below or enable phpMyAdmin access for everyone.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

## Comment below section to allow everyone
<Directory /usr/share/phpMyAdmin/>
    <IfModule !mod_authz_core.c>
     Order Deny,Allow
     Deny from All
     Allow from
     Allow from ::1

<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None

After updating phpMyAdmin Apache configuration file, restart Apache service to reload new settings.

# service httpd restart

Access phpMyAdmin in Browser

Now you can access phpMyAdmin in a browser using the following URL. Change svr1.tecadmin.net with your server IP/FQDN.


Login Details: Use MySQL username and password.


Congratulation’s You have successfully installed phpMyAdmin. Using single phpMyAdmin we can manage multiple MySQL servers by adding multiple remote MySQL server. Use this article to add multiple MySQL hosts in phpMyAdmin.