HOWTO:Installing PHPMyAdmin
From EnGardeWiki
This describes how to install and configure PHPMyAdmin on EnGarde Secure Linux.
Contents |
Introduction
PHPMyAdmin is a PHP based web application that is accessed via an SSL web site and allows administration of MySQL databases. This document assumes that PHPMyAdmin will be running on the same server as MySQL.
Enable SSH Access To The Server
You will need to have SSH access as the "root" user to the EnGarde server that will be running PHPMyAdmin. Refer to the EnGarde Secure Linux 3.0 Quick Start Guide section "6.5. Setting up Remote Access".
Setting Up an SSL Web Site on the Server
PHPMyAdmin should run on an SSL web site for security. To create an SSL web site refer to the EnGarde Secure Linux 3.0 Quick Start Guide section "6.7.3. Configure a Secure Web Server". If you already have an SSL web site configured you may skip this section and proceed to the next section.
Downloading and Installing the PHPMyAdmin Source Code
All subsequent steps must be performed as the "root" user on the server. SSH onto the server as "root". You should have either the password or the passphrase from section II to do this.
Download the source code
As of this writing the latest stable version of PHPMyAdmin is 2.7.0.pl1 Download the source tarball phpMyAdmin-2.7.0-pl1.tar.gz (it can be found at http://sourceforge.net) to the temporary directory /var/tmp.
# cd /var/tmp
# ls -l
-rw-r--r-- 1 root root 3352193 Dec 8 14:31 phpMyAdmin-2.7.0-pl1.tar.gz
Install the files
Now unpack this tarball and move the files to the proper directory.
# cd /home/httpd/SSLSERVER-443/html
# tar zxvf /var/tmp/phpMyAdmin-2.7.0-pl1.tar.gz
# mv phpMyAdmin-2.7.0-pl1 phpMyAdmin
The code is now installed.
Configuring PHPMyAdmin
Change ownership of the files
When defining a web site in the WebTool you are required to enter a user as the "webmaster" and assign a "group" to the web site. Those identities are needed for the following. When running the following commands replace WEBMASTER with the user that has been defined as the "webmaster" and replace GROUP with the group that was used.
# chown -R WEBMASTER.GROUP phpMyAdmin
Create config.php with proper permissions
# cd phpMyAdmin
# cp -p config.default.php config.inc.php
Edit config.inc.php
There are many options that can be modified in this file. These are the suggested bare minimum variables to change.
- Set up authentication via HTTP. This will allow logins for users in MySQL (using the user's MySQL password).
$cfg['Servers'][$i]['auth_type'] = 'http';
Verify operation
Now access PHPMyAdmin by going to the URL https://SERVERNAME/phpMyAdmin/ and you should be presented with a PHPMyAdmin login page where the user above can login with the root's MySQL password.
Categories: HOWTO | MySQL
