Setup database: PostgreSQL
Requirements
-
PostgreSQL 7.4 or later is required.
-
Install DBD-Pg package.
General instruction
-
Ensure that
sympa.conf
includes appropriate values for these parameters:db_type
,db_name
,db_host
,db_port
(optional),db_user
anddb_passwd
(optional).-
db_type
must bePostgreSQL
orPg
(obsoleted). -
db_host
may be host name or IP address of the database server with TCP connection (ifdb_port
is not specified,5432
is used as port), or directory of the Unix domain sockets (sockets must be writable bysympa
group).
Example:
db_type PostgreSQL db_name sympa db_host localhost db_user sympa db_passwd (secret)
-
-
Create database and role:
$ psql postgres=# CREATE ROLE <db_user> NOSUPERUSER NOCREATEDB NOCREATEROLE postgres=# NOINHERIT LOGIN ENCRYPTED PASSWORD '<db_passwd>'; postgres=# CREATE DATABASE sympa OWNER <db_user> ENCODING 'UNICODE'; postgres=# \q
-
Create table structure:
# sympa.pl --health_check
Instruction for earlier releases of Sympa
Note
- This section describes instruction with Sympa prior to 6.2.
-
Set appropriate parameters in
sympa.conf
as described in above. -
Create database and role as described in above.
-
Create table structure (Note: replace
$SCRIPTDIR
):$ psql -U <db_user> -d sympa < $SCRIPTDIR/create_db.Pg