Complete these instructions if you will be using the PostgreSQL database. If you will be using the Oracle database, instead use the Oracle setup instructions.

  1. Run the following commands to create the PostgreSQL database and database user OpenClinica uses to connect to the database:

    /opt/PostgreSQL/8.4/bin/psql -U postgres -c “CREATE ROLE clinica LOGIN ENCRYPTED PASSWORD ‘clinica’ SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE”

    /opt/PostgreSQL/8.4/bin/psql -U postgres -c “CREATE DATABASE openclinica WITH ENCODING=’UTF8′ OWNER=clinica”

  2. The database user password is set to clinica by default, which is not a secure password. Change the password as follows:
    1. Run:

      /opt/PostgreSQL/8.4/bin/psql -U postgres

    2. A psql prompt displays with this message:

      ALTER USER clinica WITH PASSWORD ‘XXXX’

    3. Replace XXXX with a secure password. Record the password for use in a later installation step.
    4. Exit the psql prompt by running:

      q