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.
Create the database:
createdb -E UNICODE calendar
- Load the database schema:
psql calendar
<>
- 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 readtcpip_socket=true
- Restart the PostgreSQL Service.
- Copy the JDBC Driver files to your application server's path, or the WEB-INF/lib directory.
- Edit the pg_hba.conf file if necessary. To test if this is necessary, run the command:
psql -h
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. - 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
No comments:
Post a Comment