How to Install phpMyAdmin on CentOS 5.7 using RPMforge Repository

phpMyAdmin is a powerful, free software tool developed in PHP. It is designed to manage MySQL over the World Wide Web, offering a comprehensive solution for both entire MySQL servers (requiring a super-user) and individual databases. With phpMyAdmin, you can perform a wide array of operations on MySQL, including managing databases, tables, fields, relations, indexes, users, permissions, and more. While the user interface supports the most frequently used operations, phpMyAdmin also allows you to execute any SQL statement directly.

In this tutorial, we will guide you on how to install phpMyAdmin on CentOS 5.7 using the RPMforge repository. This method has been tested on CentOS 5.7, but it should also work on CentOS 5.1, CentOS 5.2, CentOS 5.4, CentOS 5.5, CentOS 5.6, and RHEL 5. At the time of writing this article, the installed phpMyAdmin version was 2.11. This tutorial assumes that the third-party repository RPMforge has been added, and that MySQL and Apache Httpd server have been installed and configured.

Step-by-Step Guide to Install phpMyAdmin on CentOS 5.7

Step 1: Install phpMyAdmin

To install phpMyAdmin, you need to execute the following command:

[root@CentOS57 ~]# yum install phpmyadmin -y

This command will initiate the installation process of phpMyAdmin and its dependencies. The system will resolve dependencies and install the necessary packages.

[root@CentOS57 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.oscc.org.my
 * extras: mirror.oscc.org.my
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: mirror.oscc.org.my
base                                                                         | 1.1 kB     00:00
extras                                                                       | 2.1 kB     00:00
updates                                                                      | 1.9 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpmyadmin.noarch 0:2.11.11.3-2.el5.rf set to be updated
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpmyadmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpmyadmin
--> Processing Dependency: php-mcrypt for package: phpmyadmin
--> Running transaction check
---> Package php-mbstring.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-mbstring
---> Package php-mcrypt.i386 0:5.1.6-15.el5.centos.1 set to be updated
--> Processing Dependency: php >= 5.1.6 for package: php-mcrypt
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
---> Package php-mysql.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated
---> Package php.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-cli = 5.1.6-32.el5 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-common.i386 0:5.1.6-32.el5 set to be updated
---> Package php-pdo.i386 0:5.1.6-32.el5 set to be updated
--> 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 php-cli.i386 0:5.1.6-32.el5 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.rf                rpmforge           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-32.el5                      base               2.3 M
 php-cli                i386             5.1.6-32.el5                      base               2.1 M
 php-common             i386             5.1.6-32.el5                      base               153 k
 php-mbstring           i386             5.1.6-32.el5                      base               996 k
 php-mcrypt             i386             5.1.6-15.el5.centos.1             extras              16 k
 php-mysql              i386             5.1.6-32.el5                      base                87 k
 php-pdo                i386             5.1.6-32.el5                      base                66 k

Transaction Summary
====================================================================================================
Install      14 Package(s)
Upgrade       0 Package(s)

Total download size: 14 M
Downloading Packages:
(1/14): php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm                            |  16 kB     00:00
(2/14): php-pdo-5.1.6-32.el5.i386.rpm                                        |  66 kB     00:00
(3/14): php-mysql-5.1.6-32.el5.i386.rpm                                      |  87 kB     00:00
(4/14): libmcrypt-2.5.8-4.el5.centos.i386.rpm                                | 116 kB     00:01
(5/14): php-common-5.1.6-32.el5.i386.rpm                                     | 153 kB     00:01
(6/14): libidn-0.6.5-1.1.i386.rpm                                            | 194 kB     00:01
(7/14): curl-7.15.5-15.el5.i386.rpm                                          | 235 kB     00:01
(8/14): gmp-4.1.4-10.el5.i386.rpm                                            | 664 kB     00:05
(9/14): aspell-0.60.3-12.i386.rpm                                            | 946 kB     00:11
(10/14): php-mbstring-5.1.6-32.el5.i386.rpm                                  | 996 kB     00:08
(11/14): aspell-en-6.0-2.1.i386.rpm                                          | 1.6 MB     00:13
(12/14): php-cli-5.1.6-32.el5.i386.rpm                                       | 2.1 MB     00:20
(13/14): php-5.1.6-32.el5.i386.rpm                                           | 2.3 MB     00:23
(14/14): phpmyadmin-2.11.11.3-2.el5.rf.noarch.rpm                            | 4.2 MB     00:42
----------------------------------------------------------------------------------------------------
Total                                                               103 kB/s |  14 MB     02:14
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                                                  1/14
  Installing     : libidn                                                                      2/14
  Installing     : curl                                                                        3/14
  Installing     : gmp                                                                         4/14
  Installing     : php-mbstring                                                                5/14
  Installing     : php-pdo                                                                     6/14
  Installing     : php-mysql                                                                   7/14
  Installing     : libmcrypt                                                                   8/14
  Installing     : aspell-en                                                                   9/14
  Installing     : aspell                                                                     10/14
  Installing     : php-cli                                                                    11/14
  Installing     : php                                                                        12/14
  Installing     : php-mcrypt                                                                 13/14
  Installing     : phpmyadmin                                                                 14/14

Installed:
  phpmyadmin.noarch 0:2.11.11.3-2.el5.rf

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-32.el5                            php-cli.i386 0:5.1.6-32.el5
  php-common.i386 0:5.1.6-32.el5                     php-mbstring.i386 0:5.1.6-32.el5
  php-mcrypt.i386 0:5.1.6-15.el5.centos.1            php-mysql.i386 0:5.1.6-32.el5
  php-pdo.i386 0:5.1.6-32.el5

Complete!

Step 2: Configure phpMyAdmin

By default, phpMyAdmin allows connections only from localhost. To allow connections from all hosts, you need to modify the configuration. Change the line “Allow from 127.0.0.1” to “Allow from all”. The new configuration should look like this:

#
# Web application to manage MySQL
#
<Directory "/usr/share/phpmyadmin">
 Order Deny,Allow
 Deny from all
 Allow from all
</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Step 3: Change Authentication in phpMyAdmin

Change the authentication type in phpMyAdmin from ‘cookie’ to ‘http’. Modify the following line in the configuration:

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';

Step 4: Reload or Restart the Apache Server

After making the necessary changes, you need to reload or restart the Apache server. Use the following command to do this:

[root@CentOS57 ~]# service httpd reload

Commands Mentioned

  • yum install phpmyadmin -y – This command installs phpMyAdmin and its dependencies.
  • service httpd reload – This command reloads or restarts the Apache server to apply the changes made in the configuration.
See also  How to Download CentOS 7 ISO

Conclusion

Installing phpMyAdmin on CentOS 5.7 using the RPMforge repository is a straightforward process that involves installing the software, configuring it to allow connections from all hosts, changing the authentication type, and reloading theApache server. This guide provides a step-by-step walkthrough of the process, making it easy for even beginners to follow.

Remember, phpMyAdmin is a powerful tool that can manage an entire MySQL server as well as individual databases. It supports a wide range of operations, making it an essential tool for any webmaster or website administrator.

See also  How to Install and Configure yum-priorities on CentOS 5/RHEL 5 Linux Server

By following this guide, you can have phpMyAdmin up and running on your CentOS 5.7 server, ready to help you manage your MySQL databases. Whether you’re running a small personal project or managing a large commercial website, phpMyAdmin can make your database administration tasks much easier.

Remember, the key to successful web administration is understanding the tools at your disposal and knowing how to use them effectively. Happy hosting!

FAQ Section

  1. What is phpMyAdmin?

    phpMyAdmin is a free software tool written in PHP, designed to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server as well as a single database, supporting a wide range of operations with MySQL.

  2. What is the purpose of the RPMforge repository in this process?

    The RPMforge repository is a third-party repository that provides many cutting-edge software packages that are not available in the official CentOS repositories. In this tutorial, we use the RPMforge repository to install phpMyAdmin.

  3. Why do we need to change the authentication type in phpMyAdmin from ‘cookie’ to ‘http’?

    Changing the authentication type from ‘cookie’ to ‘http’ in phpMyAdmin is a matter of preference and requirement. ‘http’ authentication is considered simpler and more straightforward, as it doesn’t require cookies to be enabled on the user’s browser.

  4. Why do we need to reload or restart the Apache server?

    Reloading or restarting the Apache server is necessary to apply the changes made in the configuration. When the server restarts, it reads the configuration files again, incorporating any changes that have been made.

  5. Can this method be used for other versions of CentOS?

    This method has been tested on CentOS 5.7, but it should also work on CentOS 5.1, CentOS 5.2, CentOS 5.4, CentOS 5.5, CentOS 5.6, and RHEL 5. However, it’s always recommended to check the compatibility before proceeding with the installation.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *