README.Debian 4.88 KB
Newer Older
Piotr Roszatycki's avatar
Piotr Roszatycki committed
1 2 3 4 5 6
phpmyadmin for Debian
---------------------


USAGE

Piotr Roszatycki's avatar
Piotr Roszatycki committed
7
  The application will be available at http://localhost/phpmyadmin/
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
8 9 10 11
  after install if you use one of supported web servers (Apache and Lighttpd
  at time of writing this). Please note that you need to have enabled PHP
  support in your webserver (for Apache you can do this by a2enmod php5, for
  Lighttpd by lighty-enable-mod fastcgi).
12 13 14 15 16 17 18 19 20 21 22 23 24 25

  Should you get a 404 "not found" error when you installed phpMyAdmin using
  apt-get and point your browser at <http://localhost/phpmyadmin/>.

  Most likely you did not enable configuration for your webserver during
  installation. You can reconfigure phpmyadmin package to get the selection
  again and choose webserver you are using (eg. "Apache 2"):

    sudo dpkg-reconfigure -plow phpmyadmin

  You can also manually install the shipped configuration file to Apache conf.d
  directory (but the above way is preferred):

    sudo a2enconf phpmyadmin
Piotr Roszatycki's avatar
Piotr Roszatycki committed
26
  
Piotr Roszatycki's avatar
Piotr Roszatycki committed
27

Piotr Roszatycki's avatar
Piotr Roszatycki committed
28 29
PROBLEM WITH COOKIES

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
30 31 32
  After upgrading phpMyAdmin with cookie based authentication you might
  notice a problem with logging in. Removing the cookies from your browser
  may solve this issue.
Piotr Roszatycki's avatar
Piotr Roszatycki committed
33 34


Piotr Roszatycki's avatar
Piotr Roszatycki committed
35 36
CONFIGURATION

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
37 38
  The package installs a default configuration in /etc/phpmyadmin/, including
  a default apache.conf, which is optionally symlinked from your Apache config.
Piotr Roszatycki's avatar
Piotr Roszatycki committed
39

Michal Čihař's avatar
Michal Čihař committed
40
  Since 3.0.0, phpMyAdmin can be configured using dbconfig-common. It
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
41
  creates a phpmyadmin database and control user on the chosen server and
Michal Čihař's avatar
Michal Čihař committed
42
  configures phpMyAdmin to use cookie authentication on this server.
Michal Čihař's avatar
Michal Čihař committed
43 44 45 46 47
  The database autoconfiguration might fail if you do not have local MySQL
  server installed or you have configured too high priority of which questions
  should debconf ask. To rerun the configuration just invoke:
  
    dpkg-reconfigure -plow phpmyadmin
Michal Čihař's avatar
Michal Čihař committed
48

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
49
  phpMyAdmin also provides a web-based setup script available at
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
50
  http://localhost/phpmyadmin/setup/index.php
Michal Čihař's avatar
Michal Čihař committed
51

Piotr Roszatycki's avatar
Piotr Roszatycki committed
52
  This setup script requires authorization by default. You can manage usernames
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
53
  and passwords with htpasswd command in the /etc/phpmyadmin/htpasswd.setup file.
Michal Čihař's avatar
Michal Čihař committed
54 55
  Configuration from setup script overrides configuration generated from
  dbconfig-common.
Piotr Roszatycki's avatar
Piotr Roszatycki committed
56

Michal Čihař's avatar
Michal Čihař committed
57 58 59 60 61 62 63 64 65 66 67
  The setup script can not write to configuration by default, to write
  configuration, please follow these steps:

    1. as root, run /usr/sbin/pma-configure
    2. Go to setup script URL with a browser
       (e.g. http://localhost/phpmyadmin/setup/index.php)
    3. configure using the web interface and save configuration
    4. as root, run /usr/sbin/pma-secure

  Please note that on each upgrade, the installation is automatically secured.

Michal Čihař's avatar
Michal Čihař committed
68 69 70 71 72 73
  The configuration files are processed in following order:

    1. file generated by web based setup
    2. /etc/phpmyadmin/config.inc.php which can override any changes (and by
       default overrides first server configuration by data from
       dbconfig-common)
Michal Čihař's avatar
Michal Čihař committed
74 75
    3. possible snippets placed in /etc/phpmyadmin/conf.d/
    4. phpMyAdmin defaults are being applied
Piotr Roszatycki's avatar
Piotr Roszatycki committed
76 77 78 79

SECURITY

  The default configuration for Debian has enabled cookie based authentication.
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
80 81 82
  You should *not* put your passwords into /etc/phpmyadmin/config.inc.php file.
  This file has to be readable by www-data user, so it can be read by anyone
  who can run his own CGI script!
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
83

Michal Čihař's avatar
Michal Čihař committed
84 85 86 87 88 89 90
  The default configuration also does not allow you to log in with empty
  passwords, to enable it, set directive AllowNoPassword to true.

  If you do not use provided configuration snippets for webserver, please do
  not forget to protect setup directory, otherwise unauthenticated users might
  be able to modify your configuration.

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
91 92 93 94
  Register Globals: Debian does not provide security support for installations
  with the PHP register_globals setting turned On. It's also not required for
  phpMyAdmin to operate. Make sure it's off. It's trivial to turn it on just for
  specific legacy sites that may need it.
Piotr Roszatycki's avatar
Piotr Roszatycki committed
95

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111

MULTIPLE COPIES FROM ONE CODEBASE

  The recommended phpMyAdmin way to share an installation between different
  users is to use cookie or HTTP authentication to support the users, and 
  perhaps define multiple servers in config.inc.php each with their own
  hostname and other settings. This should be enough for most cases.

  If you still want to have multiple copies with different configuration,
  but using the central codebase from the Debian package, the following may
  be a poor man's solution:

  mkdir phpmyadmin-site1 && cd phpmyadmin-site1
  ln -s /usr/share/phpmyadmin/* .
  rm config.inc.php
  cp /usr/share/phpmyadmin/config.inc.php .
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
112
  sed -i 's#/etc/phpmyadmin/config.inc.php/#/etc/phpmyadmin/config-site1.inc.php#'
Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
113 114 115 116 117 118 119 120

  cd /etc/phpmyadmin/
  cp config.inc.php config-site1.inc.php
  vi config-site1.inc.php

  Make the dir you chose web-accessible and you're done for site1.
  Copy the created dir to site2 and make the necessary changes, etc.

Thijs Kinkhorst's avatar
Thijs Kinkhorst committed
121
 -- Thijs Kinkhorst <thijs@debian.org>  Mon, 21 Apr 2007 12:10:15 +0200
Michal Čihař's avatar
Michal Čihař committed
122
 -- Michal Čihař <nijel@debian.org>  Wed, 14 Oct 2009 10:32:31 +0200