Running TCK against a locally installed PostgreSQL
The default postgresql profile defined in j2eetck-mods will create an installation which runs against a PostgreSQL database installed in QA labs. To be able to run locally PostgreSQL needs to be installed and some modifications have to be made to both the PostgreSQL configuration and j2eetck-mods.
Installing PostgreSQL on Fedora
As root perform the following:
yum install postgresql-server
/etc/init.d/postgresql initdb
Configuring PostgreSQL
Login as user postgres.
Modifying the installation
Modify /var/lib/pgsql/data/pg_hba.conf to allow for localhost connections with password only.
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
Modify /var/lib/pgsql/data/postgresql.conf to specify system resources. The pgbench program can be used to tune the database for optimal performance.
Setup cts1 database
Create the 'cts1' user
> createdb -P cts1
Enter password for new role: cts1
Enter it again: cts1
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Create the 'cts1' database
> createdb -EUTF8 -O cts1 cts1
Install the plpgsql language into the 'cts1' database
> createlang plpgsql cts1
Configuring j2eetck-mods
In j2eetck-mods/bin/ts-jboss-postgresql.jte set the postgresql.server property to localhost.
In j2eetck-mods/jboss-db/jboss-postgresql/deploy/postgres-ds.xml replace the hostname in the url with localhost.
A new PostgreSQL JDBC driver can replace the one in j2eetck-mods/lib/postgresql.
Comments