Previous Topic

Next Topic

Book Contents

Book Index

PostgreSQL Configuration

  1. Login to the operating system as a User who has rights to create a database. If you haven't set this up yet, as user postgresql, run the createuser command and give the new User privileges to create databases.
  2. Create the database:

    createdb -E UNICODE calendar
  3. Load the database schema:

    psql calendar < WEB-INF/sql/PGSQL/calschema.sql
  4. You will need to edit the postgresql.conf file. On RedHat Linux, this file is in the /var/lib/pgsql/data directory. On FreeBSD, this file is in /usr/local/pgsql/data. Change the line:

    #tcpip_socket=false

    to read

    tcpip_socket=true
  5. Restart the PostgreSQL Service.
  6. Copy the JDBC Driver files to your application server's path, or the WEB-INF/lib directory.
  7. Edit the pg_hba.conf file if necessary. To test if this is necessary, run the command:

    psql -h <hostname> calendar

    If the connection is refused, you will need to add the appropriate permissions entries to PG_HBA.CONF. It may also be necessary to edit the startup script for postmaster to ensure that it is listening on TCP/IP sockets. Refer to the man page for postmaster for more information on startup options.
  8. Edit the configuration.properties file, putting in the configuration entries for your database.

DBObjectClass=com.MHSoftware.db.support.PostgreSQLDB
JDBCConnectString=jdbc\:postgresql\://localhost\:5432/calendar
JDBCUserID=calendar
JDBCPassword=calendar
JDBCDriver=org.postgresql.Driver

See Also

SQL Database Setup

SQL Database Setup Overview

Enterprise Installation

configuration.properties

IBM DB2 Configuration

Microsoft Access Configuration

Microsoft SQL Server 2000 Configuration

MySQL Installation

Oracle Configuration

Sybase Adaptive Server Anywhere Configuration