SUPPORT  :  NEBULAE MULTIUSER SERVER TECHNOTES :  NS006
 

Connecting Nebulae to a PostgreSQL Database

 

This technote assumes that the PostgreSQL database engine is installed correctly and running, and that the user can connect to the postmaster process. It is also assumed that a PostgreSQL database has already been initialized (using pg_createdb). To test if you can connect to the database locally we recommend using the psql tool, included with PostgreSQL. The setup of PostgreSQL databases and permissions can be tricky, and Tabuleiro support is not able to help you with questions related to PostgreSQL installation. Please make sure you can access the PostgreSQL database locally using the psql tool before attempting to configure the Nebulae connection.

Nebulae will connect to the PostgreSQL database using the postgresql.jar JDBC driver, included in the PostgreSQL distribution. Please locate this file and make sure it is available in a directory listed in the classpath when the Nebulae server starts. For example if you have copied the postgresql.jar driver to the /usr/local/nebulae directory you can use the following shell script to startup Nebulae (in Linux):


#!/bin/csh -f

cd /usr/local/nebulae

unlimit

/usr/local/j2sdk1.3.1/bin/java -green -Djava.compiler=NONE -cp Nebulae.jar:/usr/local/nebulae:postgresql.jar net.tabuleiro.nebulae.Nebulae &


In the Nebulae.cfg file you need to find and edit the SQL related directives to the following values:


EnableSQLDatabase = 1

SQLBackend = postgresql

SQLDatabaseDriver = org.postgresql.Driver

SQLDatabaseURL = jdbc:postgresql:YourDatabaseName

SQLDatabaseUsername = postgres

SQLDatabasePassword = postgres


Notice that the SQLDatabaseURL directive contains the name of the JDBC database. SQLDatabaseUsername and SQLDatabasePassword should contain the name and password for an user that has user access to the database, as defined by PostgreSQL rules. Please consult the Nebulae server log for any error messages that may occur during the initialization of the SQL connection.

 

 ID: PRODUCT: PLATFORM: VERSION: KEYWORDS: LAST UPDATED: AREA:
 NS006 Nebulae MultiUser Server All 1.2 PostgreSQL, Postgres, Nebulae October 13, 2003 Nebulae