From 8c45f927f44879f2a001f5d3754a983cabdb0367 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 23 Nov 2006 15:59:37 +1300 Subject: [PATCH] More details about configuring PostgreSQL. --- docs/website/installation.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/website/installation.php b/docs/website/installation.php index f25548aa..0d0359f9 100644 --- a/docs/website/installation.php +++ b/docs/website/installation.php @@ -81,6 +81,8 @@ box.

Database Setup

+

Creating the Web User for the Database

+

On your database server you will need to create a user called 'general' which should not be able to create databases or users, and which will be granted minimum privileges for the application.

@@ -102,6 +104,8 @@ For example (for PostgreSQL 8.x):

su postgres -c createuser --no-createdb --no-createrole general +

Creating and Building the Database

+

To create the database itself, run the script:

 dba/create_database.sh
@@ -118,10 +122,31 @@ may need to do this as the "postgres" user, for example:

su postgres -c /usr/share/rscds/dba/create-database.sh
+

Connecting to the Database

+

Once your database has been created, you may also need to edit your pg_hba.conf file in order to grant the application access to the database as the 'general' user.

+

In a simple installation, where you do not have untrusted +users on your database server, and your database is on the same +computer as the web server, the following line (near the top +of the pg_hba.conf file) should be enough:

+ +
+local   rscds    general   trust
+
+ +

This means that anyone on the local computer (including the +web application) will have rights to connect to the RSCDS +database as the 'general' user. It will not allow remote access, +or access as any user other than 'general'.

+ +

If you want greater security, or if you want to have the +database on a different server, you should read the +PostgreSQL documentation on pg_hba.conf +for the version you are using.

+

Apache VHost Configuration

Your Apache instance needs to be configured for Virtual Hosts. If