How to install phpMyAdmin
This guide shows how to install phpMyAdmin - an easy to use adminitration tool for mysql database.
Install mysql database
This issue has been described here: How_to_install_MySQL
Install PHP and www server
su slapt-get -u slapt-get -i httpd php
Start the web server to test if it is working:
/etc/rc.d/rc.httpd start
open the browser and go to http://localhost/. You should see big "It works". This means the webserver is working. In order to make the web server autostart during boot:
chmod a+x /etc/rc.d/rc.httpd
We have to configure the server in order to handle PHP files. Thus edit /etc/httpd/httpd.conf:
- uncomment the following line to enable PHP: Include /etc/httpd/mod_php.conf
- add the line: AddType application/x-httpd-php .php
- find the DirectoryIndex line and chage it by adding index.php to give something like that:: DirectoryIndex index.html index.php
Restart the web server:
/etc/rc.d/rc.httpd restart
In order to test if the webserwer handles PHP files try to create the file /var/www/htdocs/test.php containing phpinfo() command:
<?php phpinfo(); ?>
Then point your browser to http://localhost/test.php. If everything is OK you should see a blue table with PHP details.
Install phpMyAdmin
Download phpMyAdmin from phpMyAdmin.net. Unpack it to /var/www/htdocs/. You can symlink the new directory to /var/www/htdocs/phpmyadmin in order to simplify the address. Go to the directory with phpMyAdmin and create the config file using the sample:
cp config.sample.inc.php config.inc.php
Edit this files; find the line $cfg['blowfish_secret'] = ; and define this entry in order to enable authentication with cookies:
$cfg['blowfish_secret'] = 'something' ;
make sure $cfg['Servers'][$i]['auth_type'] is set to cookie:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
At this moment phpMyAdmin should work. If you symlinked its orginal directory to /var/www/htdocs/phpmyadmin it should be accesible via your browser.