3.7 Installing PostgreSQL

3.7.1 Installing PostgreSQL 8

The directory context for PostgreSQL scripts is found in the install-dir\DirXMLUtilities\jdbc\sql\postgres\install directory on Windows or install-dir/lib/dirxml/rules/jdbc/sql/postgres/install directory on UNIX/Linux platforms. The directory context for executing Postgres commands is postgres-install-dir/pgsql/bin.

  1. Create the idm database.

    For example, from the UNIX command line, execute the following command:

    ./createdb idm

  2. From a Postgres client such as psql, log in as user postgres to the idm database.

    For example, from the UNIX command line, execute the following command:

    ./psql -d idm postgres

    By default, the Postgres user has no password.

  3. From inside psql, execute the script 1_install_8.sql. For example:

    idm=# \i 1_install_8.sql

  4. Update the pg_hba.conf file.

    As of version 8, this can be done through pgAdminIII. After you start, go to Tools > Connect to connect to the server, select the IDM database, then go to Tools > Server Configuration > pg_hba.conf. In the pgAdminIII pg_hba.conf editor, the IP-ADDRESS and IP-MASK columns in the file are combined into a single field: IP-Address. Place both the IP-ADDRESS and IP-MASK values in that field, separated by a single whitespace character.

    For example, add entries for the idm database user. Adjust the IP-ADDRESS and IP-MASK as necessary:

    # TYPE  DATABASE    USER   IP-ADDRESS        IP-MASK           METHOD# allow driver user idm to connect to database idm
    host    idm         idm    <ip-address>   <net-mask>     password
    
  5. Restart the Postgres server to effect changes made to the pg_hba.conf file.

  6. (Conditional) If you are using pgAdminIII, in the pg_hba.conf editor select the disk icon (save file) in the toolbar. When prompted, press Yes.

3.7.2 Installing PostgreSQL 9

The directory context for PostgreSQL scripts is found in the install-dir\DirXMLUtilities\jdbc\sql\postgres\install directory on Windows or install-dir/lib/dirxml/rules/jdbc/sql/postgres/install directory on UNIX/Linux platforms. The directory context for executing Postgres commands is postgres-install-dir/pgsql/bin.

  1. Create the database idm.

    For example, from the UNIX command line, execute the following command:

    ./createdb idm

  2. Install the plpgsql procedural language to database idm.

    For example, from the UNIX command line, execute the following command:

    ./createlang plpgsql idm

  3. From a Postgres client such as psql, log on as user postgres to the idm database.

    For example, from the UNIX command line, execute the following command:

    ./psql -d idm postgres

    By default, the Postgres user has no password.

  4. From inside psql, execute the script 1_install_8.sql. For example:

    idm=# \i 1_install_8.sql

  5. Update the pg_hba.conf file.

    For example, add entries for the idm database user. Adjust the IP-ADDRESS and IP-MASK as necessary:

    # TYPE  DATABASE    USER   IP-ADDRESS        IP-MASK           METHOD# allow driver user idm to connect to database idm
    host    idm         idm    <ip-address>   <net-mask>     password
    
  6. Restart the Postgres server to effect changes made to the pg_hba.conf file.