User Tools

Site Tools


linux:apache:phpmyadmin

phpMyAdmin installation

The Red Hat Way:

Download phpMyAdmin

wget http://sourceforge.net/projects/phpmyadmin/files%2FphpMyAdmin%2F2.11.11.3%2FphpMyAdmin-2.11.11.3-all-languages.tar.gz/download#!md5!a4a9bdcf6a48d02895034e41844e7432

Setup

tar xvzf phpMyAdmin-2.11.11.3-all-languages.tar.gz
mv phpMyAdmin-2.11.11.3-all-languages phpMyAdmin
chown apache.apache phpMyAdmin 
cd phpMyAdmin
chown apache.apache *
cp config.sample.inc.php config.inc.php

Change your Config:

vi config.inc.php

set
$cfg['Servers'][$i]['auth_type'] = 'cookie';
to
$cfg['Servers'][$i]['auth_type'] = 'http';

CentOS:

Install the REMI Repository

wget http://download.fedora.redhat.com/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
yum install phpmyadmin

Edit your configuration:

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

Access

https://localhost/phpMyAdmin

Denying access from outside:

To make sure that phpmyadmin is only accessible from the local subnet you have to change httpd.conf

# /inetpub/conf/httpd.conf
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All

Create a .htaccess file in your phpmyadmin direcory

vi /etc/httpd/html/phpmyadmin/.htaccess

The file should have the following content:

 # Replace 192.168.3 with your Subnet
Order deny,allow
Deny from all
Allow from 192.168.3

Change the permissions for .htaccess:

chmod 770 .htaccess
chown apache.root .htaccess

Restart httpd:

service httpd restart
linux/apache/phpmyadmin.txt · Last modified: 2012/01/16 14:10 by skull@darktemple.ch