Step #1
phpMyAdmin – Download and Install
Home:
http://www.phpmyadmin.net
# Unzip and Untar
tar xvf phpMyAdmin-2.8.1.tar.gz -C /opt/apache/htdocs/
mv /opt/apache/htdocs/phpMyAdmin-2.8.1/ /opt/apache/htdocs/phpMyAdmin/
Step #2
Configure and Test phpMyAdmin
# Configure (by editing a few lines to match your setup):
cp /opt/apache/htdocs/phpMyAdmin/config.default.php
/opt/apache/htdocs/phpMyAdmin/config.inc.php
vi /opt/apache/htdocs/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'YourPassword'; // MySQL password
# Quick test in your web browser:
http://YourServerIP/phpMyAdmin/index.php
# Edit httpd.conf to allow "main.php" as a default web page for a directory listing, add main.php to the end of this line:
vi /opt/apache/conf/httpd.conf
DirectoryIndex index.html index.php
# Create an ".htaccess" file to permit only users you specify to access phpMyAdmin from the web
vi /opt/apache/htdocs/phpMyAdmin/.htaccess
AuthUserFile /etc/phpMyAdminhtpasswd.users
AuthName "phpMyAdmin Access"
AuthType Basic
require valid-user
# Add the first user to create the password file:
/opt/apache/bin/htpasswd -c /etc/phpMyAdminhtpasswd.users admin
# Add more users without creating a new file:
/opt/apache/bin/htpasswd /etc/phpMyAdminhtpasswd.users SomeUserNameHere
# Edit the Apache configuration file (Add to the very bottom of the file!)
vi /opt/apache/conf/httpd.conf
Alias /phpMyAdmin "/opt/apache/htdocs/phpMyAdmin"
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
# Update permissions
chown -R nobody:nobody /opt/apache/htdocs/
# Restart Apache
/opt/apache/bin/apachectl -k restart
# Quick test in your web browser (You should be prompted for a password:
http://YourServerIP/phpMyAdmin
PeHPMyAdhemin
| Tuesday, February 20, 2007
This entry was posted on 9:31 PM
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
Subscribe to:
Post Comments (Atom)
0 komentar:
Post a Comment