Configuring PostgreSQL to work with MITS Report - FTP Directory ...

arizonahoopleData Management

Nov 28, 2012 (4 years and 7 months ago)

253 views

1
Using PostgreSQL with MITS Report
2
Introduction
This document is intended to instruct users on running MITS Report with PostgreSQL as an
internal database. It is assumed that the user has no prior experience with PostgreSQL.
Requir
ements
To use PostgreSQL with MITS Report, you will need the following:
• MITS Report Server, installed and running. Note it’s installation location, as it will be referenced
when configuring MITS Report to work with PostgreSQL.
• PostgreSQL 8.3 or higher for your OS. Though other packages exist, we recommend using the
"One-Click" PostgreSQL installer, available on the EnterpriseDB website here:
http://www
.enterprisedb
.com/pr
oducts/pgdo
wnload.do
• pgAdmin. This graphical interface simplifies modifying configuration files on PostgreSQL and
will be used when configuring PostgreSQL to work with MITS Report.
Installing PostgreSQL
Follow the instructions provided by PostgreSQL for installation of their database.
Take note of the following pieces of information during installation:
• Path to the Data directory (used in the configuration files for PostgreSQL)
• Database account name (defaults to postgres, used in the configuration file for MITS Report)
• The password for the ‘postgres’ superuser (used in the configuration file for MITS Report)
• Listening Port number (defaults to 5432, used in the configuration file for MITS Report)

While MITS Report is supported on Red Hat Enterprise Linux 3 or greater, using PostgreSQL as an
internal database will change the minimum requirement for Red Hat Enterprise Linux to 4 or greater.

If installing on Windows, create a local Windows user named "postgres", create a folder in
the root C: drive called "PostgreSQL" and give the postgres user full control permissions to
this folder, then run the PostgreSQL installer as Administrator and specify this folder.
Configuring PostgreSQL to work with MITS
3
Configuring PostgreSQL to work with MITS Report
There are two configuration files within PostgreSQL that need to be modified. Both are accessible
from the pgAdmin utility, packaged with the "One-Click" PostgreSQL Installer. It is also available
as a standalone program from the pgAdmin web site (http://www.pgadmin.org/). While the
configuration files can be modified using any standard text editor, this guide assumes the use of
pgAdmin.
The two files are:
• postgresql.conf - This file provides a number of ways to optimize performance of PostgreSQL.
For the purposes of using PostgreSQL with MITS Report, we will only be modifying one field:
"listen_addresses".
• pg_hba.conf - This file controls client access. We will be creating a new client access configuration
for MITS Report to use.
To modify these configuration files, start pgAdmin and log in using the ‘postgres’ superuser
account (provided during installation).

PostgreSQL must be stopped before editing these files. If the service is not stopped, any changes made
will not be written to the configuration file or saved!
4
Configuring postgr
esql.conf
To modify the postgresql.conf file:
1. From within pgAdmin, click File and select Open postgresql.conf.
2. Navigate to the directory where postgresql.conf is located (in the data directory specified during
installation).
3. Select postgresql.conf and click Open.
You should see a screen similar to the following:
4. Double-click on the listen_addresses field.
Configuring PostgreSQL to work with MITS
5
5. Select the Enabled check box and change the value to ‘*’.
Click OK to return to the Backend Configuration Editor.
6. Save the file from the Backend Configuration Editor using the disk icon.
6
Configuring pg_hba.conf
To modify the pg_hba.conf file:
1. From within pgAdmin, click File and select Open pg_hba.conf.
2. Navigate to the directory where pg_hba.conf is located (in the data directory specified during
installation).
3. Select pg_hba.conf and click Open.
You should see a screen similar to the following:
4. Double-click on the empty check box to create a new client configuration.
Configuring PostgreSQL to work with MITS
7
5. Select the Enabled check box.
Set Type to host.
Set Database to postgres (default database created during installation).
Set User to postgres (Superuser account).
Set IP Address to that of the computer hosting MITS Report Server followed by a "/32". The
IP Address is necessary even if PostgreSQL is located on the same computer as MITS Report
Server. The "/32" is security related and also necessary for this client configuration to work.
Set Method to md5.
Click OK to return to the Backend Configuration Editor.
6. Save the file from the Backend Configuration Editor using the disk icon.
Start PostgreSQL to apply the changes.

If you forgot to stop PostgreSQL before making changes to the configuration files, the changes will not
be saved. Stop PostgreSQL and modify the configuration files again if the changes are not saved.
8
Configuring MITS Report to work with PostgreSQL
Once PostgreSQL is installed and configured, MITS Report will need to be configured to use
PostgreSQL. This is done by modifying the mitsreport.properties file. The values provided in this
example use the default database and port values with variables for IP Address of the server
hosting PostgreSQL and the password for the ’postgres’ superuser account.
To modify the mitsreport.properties file:
1. Navigate to the installation directory of MITS Report.
2. Change directories to the \shared\classes sub-directory.
3. Using a text editor, open the mitsreport.properties file.
4. Make the following changes in the Database Connection Properties section:
Set reportingDatabase.type to
POSTGRESQL
Set reportingDatabase.schemaName to
PUBLIC
Set reportingDatabase.jdbc.url to
jdbc:postgresql://
<ipHostingPostgreSQL>
:5432/
postgres
Set reportingDatabase.jdbc.driverClassName to
org.postgresql.Driver
Set reportingDatabase.jdbc.username to
postgres
Set reportingDatabase.jdbc.password to <passwordForSuperuserPostgres>
5. Save the file and restart MITS Report to apply the changes.