Managing a database can be done in multiple way: direct access via SQL commands or batches, system native GUI interface, web interfaces in several languages (PHP, Flash ActionScript, Ruby, ...). One of the most user friendly is certainly via a web interface as it does not require any specific installation on the user desktop. That's the choice that FREE is providing and that what we are going to mimic on our development platform with phpMyAdmin, generally referenced as PMA.
The first step consists in installing a very neat tool from Gentoo geared toward web server installation and configuration: webapp-config. This tool is generally used to help web server administrators to spread third party products configuration among their hosted sites when using virtual hosting. In our case, even if we only develop a single web site, this tool will be used during the installation of our database administration tool. So, there it goes:
Now, this tool must be configured to match our formers installtion steps. In /etc/vhosts/webapp-config, at line 43, the value vhost_root must match the root of your local site:
Still under the same file, at line 70, web-app needs to be tell the kind of web server that we are running for this local site:
Finally, some permissions must be reviewed for convenience beginning at line 169 to 178:
The next step consists in installing PMA. If you need virtual hosting, just set an appropriate USE flag under Portage:
echo "dev-db/phpmyadmin vhosts" >> /etc/portage/package.use
Now proceed with the installation:
There is still a couple of things to do. Our webserver must be able to handle aliases. This is achieved in our web server configuration file: /etc/lighttpd.conf. In the server.modules section, uncomment the mod_alias at line 17. Finally, at the end of the file, set a proper alias to shorten long URL:
alias.url =("/phpmyadmin/" => "/home/pierre/site/htdocs/phpmyadmin/")
It's time to check our installation by restarting the web server:
and by pointing your favorite web browser to http://127.0.0.1/phpmyadmin/.