Document Actions

phpMyAdmin Install Guide

by David Hostetler [modified 20120211:19:43 (Sat)] [posted 20071111:03:17 (Sun)]

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

  1. Presumably MySQL is already installed.  phpMyAdmin doesn't make much sense without it.
  2. 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-config for further details
  3. configure phpMyAdmin
    • copy config.sample.inc.php to config.inc.php
    • edit config.inc.php:
      • $cfg['blowfish_secret'] = '<some random string>';
  4. point your browser at https://yoursite/phpmyadmin to see if things are kosher.
  5. 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.

  6. Finished!

 

Upgrading

  1. 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.
  2. Remind yourself what's installed:
    • webapp-config --li -V phpmyadmin
  3. Remind yourself what new version is available:
    • webapp-config --lui phpmyadmin
  4. Run the upgrade:
    • webapp-config -V -U -h <host> --secure -d phpmyadmin phpmyadmin X.Y.Z
    • ...where X.Y.Z is the new version available.
  5. Merge any new config changes:
    • kdiff3 config.sample.inc.php config.inc.php
  6. Check for any other necessary merges:
    • CONFIG_PROTECT=<phpmyadmin dir> etc-update
    • ...where <phpmyadmin dir> is the location of the instance you're upgrading.
  7. Login to phpmyadmin, wherever you've exposed it on your webserver, and verify that everything works.
  8. You can likely uninstall any the old versions:
    • emerge -avt --unmerge "<phpmyadmin-X.Y.Z"
  9. Finished!