Wednesday, June 1, 2011

How To Install PhpMyAdmin On CentOS

CentOS 5.5 version :

1. import key :

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

2. install rpm :

cd /tmp
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm ( https://rpmrepo.org/RPMforge/Using )
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm

3. install phpmyadmin using yum :

yum install phpmyadmin

4. config phpmyadmin :

4.1 Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the stanza):

vi /etc/httpd/conf.d/phpmyadmin.conf


# Web application to manage MySQL
#
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

4.2 Next we change the authentication in phpMyAdmin from cookie to http:

vi /usr/share/phpmyadmin/config.inc.php

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

5. restart apache

========================================================================================================================

Additional case :

1. Error : The configuration file now needs a secret passphrase (blowfish_secret)

To fix:

nano /usr/share/phpmyadmin/conf.inc.php

Look for a line and enter any password. Just dont leave it empty!

$cfg['blowfish_secret'] = 'mydemopass'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

No comments:

Post a Comment