In this guide, we will walk you through the process of installing phpMyAdmin on CentOS 5.8 using the EPEL repository.
phpMyAdmin is a powerful open-source tool, written in PHP, designed to handle MySQL administration via a web interface over the internet. It can manage an entire MySQL server as well as individual databases.
This guide assumes that MySQL and Apache Httpd server have already been installed and configured properly on your system.
For more in-depth information about web servers, you can visit our articles on Apache, Nginx, and LiteSpeed.
Step 1: Install and Configure EPEL Repository
The first step in installing phpMyAdmin on CentOS 5.8 is to install and configure the Extra Packages for Enterprise Linux (EPEL) repository. EPEL repository is an additional repository that creates, maintains, and manages a high-quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server. You can follow the steps in this guide to install and configure the EPEL repository on CentOS 5.8.
Step 2: Install phpMyAdmin
After setting up the EPEL repository, you can install phpMyAdmin by running the following command:
[root@centos58 ~]# yum install phpmyadmin -y
This command will install phpMyAdmin along with its dependencies. The installation process may take a few minutes to complete.
Example :
[root@centos58 ~]# yum install phpmyadmin -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.ipserverone.com * epel: mirror.nus.edu.sg * extras: centos.ipserverone.com * updates: mirrors.hostemo.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package phpMyAdmin.noarch 0:2.11.11.3-2.el5 set to be updated --> Processing Dependency: php-mcrypt >= 4.1.0 for package: phpMyAdmin --> Processing Dependency: php-gd >= 4.1.0 for package: phpMyAdmin --> Processing Dependency: php-mysql >= 4.1.0 for package: phpMyAdmin --> Processing Dependency: php >= 4.1.0 for package: phpMyAdmin --> Processing Dependency: php-mbstring >= 4.1.0 for package: phpMyAdmin --> Running transaction check ---> Package php.i386 0:5.1.6-34.el5_8 set to be updated --> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php --> Processing Dependency: php-cli = 5.1.6-34.el5_8 for package: php --> Processing Dependency: libcurl.so.3 for package: php --> Processing Dependency: libgmp.so.3 for package: php --> Processing Dependency: libidn.so.11 for package: php --> Processing Dependency: libaspell.so.15 for package: php --> Processing Dependency: libpspell.so.15 for package: php ---> Package php-gd.i386 0:5.1.6-34.el5_8 set to be updated ---> Package php-mbstring.i386 0:5.1.6-34.el5_8 set to be updated ---> Package php-mcrypt.i386 0:5.1.6-15.el5.centos.1 set to be updated --> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt ---> Package php-mysql.i386 0:5.1.6-34.el5_8 set to be updated --> Processing Dependency: php-pdo for package: php-mysql --> Running transaction check ---> Package aspell.i386 12:0.60.3-12 set to be updated --> Processing Dependency: aspell-en for package: aspell ---> Package curl.i386 0:7.15.5-15.el5 set to be updated ---> Package gmp.i386 0:4.1.4-10.el5 set to be updated ---> Package libidn.i386 0:0.6.5-1.1 set to be updated ---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated ---> Package php-cli.i386 0:5.1.6-34.el5_8 set to be updated ---> Package php-common.i386 0:5.1.6-34.el5_8 set to be updated ---> Package php-pdo.i386 0:5.1.6-34.el5_8 set to be updated --> Running transaction check ---> Package aspell-en.i386 50:6.0-2.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: phpMyAdmin noarch 2.11.11.3-2.el5 epel 4.2 M Installing for dependencies: aspell i386 12:0.60.3-12 base 946 k aspell-en i386 50:6.0-2.1 base 1.6 M curl i386 7.15.5-15.el5 base 235 k gmp i386 4.1.4-10.el5 base 664 k libidn i386 0.6.5-1.1 base 194 k libmcrypt i386 2.5.8-4.el5.centos extras 116 k php i386 5.1.6-34.el5_8 updates 2.3 M php-cli i386 5.1.6-34.el5_8 updates 2.1 M php-common i386 5.1.6-34.el5_8 updates 154 k php-gd i386 5.1.6-34.el5_8 updates 118 k php-mbstring i386 5.1.6-34.el5_8 updates 996 k php-mcrypt i386 5.1.6-15.el5.centos.1 extras 16 k php-mysql i386 5.1.6-34.el5_8 updates 87 k php-pdo i386 5.1.6-34.el5_8 updates 66 k Transaction Summary ==================================================================================================== Install 15 Package(s) Upgrade 0 Package(s) Total download size: 14 M Downloading Packages: (1/15): php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm | 16 kB 00:00 (2/15): php-pdo-5.1.6-34.el5_8.i386.rpm | 66 kB 00:00 (3/15): php-mysql-5.1.6-34.el5_8.i386.rpm | 87 kB 00:00 (4/15): libmcrypt-2.5.8-4.el5.centos.i386.rpm | 116 kB 00:00 (5/15): php-gd-5.1.6-34.el5_8.i386.rpm | 118 kB 00:00 (6/15): php-common-5.1.6-34.el5_8.i386.rpm | 154 kB 00:01 (7/15): libidn-0.6.5-1.1.i386.rpm | 194 kB 00:01 (8/15): curl-7.15.5-15.el5.i386.rpm | 235 kB 00:01 (9/15): gmp-4.1.4-10.el5.i386.rpm | 664 kB 00:05 (10/15): aspell-0.60.3-12.i386.rpm | 946 kB 00:08 (11/15): php-mbstring-5.1.6-34.el5_8.i386.rpm | 996 kB 00:08 (12/15): aspell-en-6.0-2.1.i386.rpm | 1.6 MB 00:13 (13/15): php-cli-5.1.6-34.el5_8.i386.rpm | 2.1 MB 00:18 (14/15): php-5.1.6-34.el5_8.i386.rpm | 2.3 MB 00:26 (15/15): phpMyAdmin-2.11.11.3-2.el5.noarch.rpm | 4.2 MB 00:37 ---------------------------------------------------------------------------------------------------- Total 108 kB/s | 14 MB 02:09 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : php-common 1/15 Installing : libidn 2/15 Installing : curl 3/15 Installing : gmp 4/15 Installing : php-gd 5/15 Installing : php-mbstring 6/15 Installing : php-pdo 7/15 Installing : php-mysql 8/15 Installing : libmcrypt 9/15 Installing : aspell-en 10/15 Installing : aspell 11/15 Installing : php-cli 12/15 Installing : php 13/15 Installing : php-mcrypt 14/15 Installing : phpMyAdmin 15/15 Installed: phpMyAdmin.noarch 0:2.11.11.3-2.el5 Dependency Installed: aspell.i386 12:0.60.3-12 aspell-en.i386 50:6.0-2.1 curl.i386 0:7.15.5-15.el5 gmp.i386 0:4.1.4-10.el5 libidn.i386 0:0.6.5-1.1 libmcrypt.i386 0:2.5.8-4.el5.centos php.i386 0:5.1.6-34.el5_8 php-cli.i386 0:5.1.6-34.el5_8 php-common.i386 0:5.1.6-34.el5_8 php-gd.i386 0:5.1.6-34.el5_8 php-mbstring.i386 0:5.1.6-34.el5_8 php-mcrypt.i386 0:5.1.6-15.el5.centos.1 php-mysql.i386 0:5.1.6-34.el5_8 php-pdo.i386 0:5.1.6-34.el5_8 Complete!
Step 3: Configure phpMyAdmin
Once phpMyAdmin is installed, you need to configure it. Open the phpMyAdmin.conf configuration file using the following command:
[root@centos58 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
The original configuration only allows access from localhost. If you want to allow access from any IP address (which is very dangerous unless properly secured by SSL), you can change the configuration as follows:
<Directory /usr/share/phpMyAdmin/> Order Deny,Allow Deny from All Allow from All Allow from ::1 </Directory>
Step 4: Restart Apache Httpd Service
After configuring phpMyAdmin, you need to restart the Apache Httpd service for the changes to take effect. You can do this by running the following command:
[root@centos58 ~]# /etc/init.d/httpd restart
Step 5: Access phpMyAdmin
Now, you can access phpMyAdmin from your browser using the following URL:
http://CentOS5.8_Ipaddress/phpmyadmin/
This completes the installation of phpMyAdmin – 2.11.11.3 on your CentOS 5.8.
Commands Mentioned
- yum install phpmyadmin -y – This command installs phpMyAdmin along with its dependencies.
- vi /etc/httpd/conf.d/phpMyAdmin.conf – This command opens the phpMyAdmin configuration file for editing.
- /etc/init.d/httpd restart – This command restarts the Apache Httpd service, applying any changes made in the configuration files.
Conclusion
In this tutorial, we have walked you through the process of installing phpMyAdmin on CentOS 5.8 using the EPEL repository. This powerful tool allows you to manage your MySQL server and databases via a web interface, making database administration more accessible and efficient. We have also discussed how to configure phpMyAdmin and how to access it from your browser. Remember, while it is possible to allow access from any IP address, this can be very dangerous unless properly secured by SSL. It is generally recommended to restrict access to specific, trusted IP addresses.
Whether you’re running a dedicated server, a VPS server, or utilizing cloud hosting or shared hosting, understanding how to install and configure tools like phpMyAdmin is an essential skill for any webmaster or website administrator.
We hope this guide has been helpful. If you have any further questions, feel free to ask.
Happy hosting!
FAQ
-
What is phpMyAdmin?
phpMyAdmin is an open-source tool written in PHP, designed to handle MySQL administration via a web interface over the internet. It can manage an entire MySQL server as well as individual databases.
-
What is the EPEL repository?
The EPEL (Extra Packages for Enterprise Linux) repository is an additional repository that creates, maintains, and manages a high-quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server.
-
How can I access phpMyAdmin after installation?
You can access phpMyAdmin from your browser using the following URL: http://CentOS5.8_Ipaddress/phpmyadmin/ Replace “CentOS5.8_Ipaddress” with the IP address of your CentOS 5.8 server.
-
Why do I need to restart the Apache Httpd service after configuring phpMyAdmin?
Restarting the Apache Httpd service applies any changes made in the configuration files. This is necessary for the changes to take effect.
-
Is it safe to allow access to phpMyAdmin from any IP address?
Allowing access to phpMyAdmin from any IP address can be very dangerous unless it is properly secured by SSL. It is generally recommended to restrict access to specific, trusted IP addresses.