summaryrefslogtreecommitdiff
path: root/debian/README.postgresql
blob: 66fb388555947fd3ba515ae39350bd6add23ee9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
How to setup the postgresql database
====================================

As far as postgresql is concerned, dbconfig-common is still limited,
meaning authentication to the postgresql server has to be setup
manually.

We show a typical postgresql default config
(/etc/postgresql/x.y/zz/pg_hba.conf), where the line that is to be
added and allows access to phpbb as it is configured by this package
is prepended with a plus (+) sign. (The plus sign is NOT to be copied
to the config!)

 # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
 local   all         postgres                          ident sameuser
+local   phpbb3      phpbb3                            md5
 local   all         all                               ident sameuser
 host    all         all         127.0.0.1/32          md5
 host    all         all         ::1/128               md5

Note that the entry has to be made at the shown location and not
simply at the end of the file.

Reload postgresql for the changes to take effect. The password that
you entered during installation will be used by phpbb to authenticate
to the database; you don't need to put it anywhere else.

To give more users access to more databases just add other lines like
the above to the configuration.

You can use the same user and the same database for different forums
by specifying a different table_prefix for each installation in the
phpBB config. Note that all users can however access all databases then.

Further examples when adding more forums:

# same user, different database:
# let's hope they don't guess the name of the other databases
local   phpbb3-2      phpbb3                            md5

# different user, same database:
# only makes sense when you set table-specific privileges
local   phpbb3      phpbb3-2                            md5

# different user, different database:
# the way things should be
local   phpbb3-2      phpbb3-2                          md5

Again: do not simply add any of these to the bottom of the config
file, but at the location that was shown in the first example,
i.e. before the authentication for "all" is defined for the connection
method that you choose to employ (local=Unix-domain socket,
host=TCP/IP).

For further details about client authentication to PostgreSQL, please
consult the excellent documentation at 
http://www.postgresql.org/docs/7.4/static/client-authentication.html.