phpMyAdmin Install Guide
Step-by-step guide to installing, configuring and upgrading phpMyAdmin on Gentoo.
The phpMyAdmin installation documentation should be referenced, and supercedes any information provided here.
Process
- Presumably MySQL is already installed. phpMyAdmin doesn't make much sense without it.
- install phpMyAdmin
echo "dev-db/phpmyadmin ~x86 ~amd64" >> /etc/portage/package.keywords
emerge -avt phpmyadmin
- if you're using vhosts with apache, the emerge doesn't actually create a usable phpmyadmin instance, you have to use webapp-config to finish:
- first, edit the webapp-config configuration file to ensure its defaults are appropriate
vim /etc/vhosts/webapp-config
- now use webapp-config to install the instance of the application
webapp-config -I -h <vhostname> -u <username> -g <groupname> --secure -d <vhost_subdir> phpmyadmin 3.1.1
- where
<vhost_subdir>is a directory name under your vhost's rootdir where you want the instance to live, and '3.1.1' is the version of phpMyAdmin that you're installing
<username>and<groupname>are used to establish ownership of the files once they're installed. You should specify the user/group under which your webserver (apache) runs. Alternatively, omit these arguments and ensure that the corrsponding values are set correctly in/etc/vhosts/webapp-config.- An example of the above command is as follows:
webapp-config -I -h negativesum -u apache -g apache --secure -d raw/phpmyadmin phpmyadmin 3.4.9
- if that works successfully, you'll find all of the phpMyAdmin files in
<vhost_dir>/<vhost_subdir>. - use 'man webapp-config' and
/etc/vhosts/webapp-configfor further details
- first, edit the webapp-config configuration file to ensure its defaults are appropriate
- configure phpMyAdmin
- copy config.sample.inc.php to config.inc.php
- edit config.inc.php:
$cfg['blowfish_secret'] = '<some random string>';
- point your browser at https://yoursite/phpmyadmin to see if things are kosher.
login (via http://yoursite/phpmyadmin) using a valid mysql login. Note that phpMyAdmin maintains no notion of user account itself -- it defers entirely to mysql.
Finished!
Upgrading
- Presumably, a normal emerge @world update pulled in a new phpmyadmin version, and since we're using vhosts, webapp-config didn't automatically install it.
- Remind yourself what's installed:
webapp-config --li -V phpmyadmin
- Remind yourself what new version is available:
webapp-config --lui phpmyadmin
- Run the upgrade:
webapp-config -V -U -h <host> --secure -d phpmyadmin phpmyadmin X.Y.Z
- ...where
X.Y.Zis the new version available.
- Merge any new config changes:
kdiff3 config.sample.inc.php config.inc.php
- Check for any other necessary merges:
CONFIG_PROTECT=<phpmyadmin dir> etc-update
- ...where
<phpmyadmin dir>is the location of the instance you're upgrading.
- Login to phpmyadmin, wherever you've exposed it on your webserver, and verify that everything works.
- You can likely uninstall any the old versions:
emerge -avt --unmerge "<phpmyadmin-X.Y.Z"
- Finished!