Install PostgreSQL

To install PostgreSQL, perform the short version of the installation instructions at the PostgreSQL website. On the Documentation page, select the Manuals option, and then choose the appropriate version to read.

  1. Open the pgAdmin tool that comes with PostgreSQL, /usr/local/pqsql/bin.
    Note: If you choose to use the grapical pgadminIII tool, it requires access to port 5432 on the server or through a secure shell (SSH) tunnel. Instructions for this tool are not provided here.
  2. Log in as super user and create a new login role for the owner of the Dataverse Network's database.
    1. Type:
      su - postgres
      cd /usr/local/pgsql/bin
      ./createuser -lPE dvnApp
    2. Enter the password, and then enter it again.
    3. Respond no to the superuser prompt.
    4. Respond yes to the create databases prompt.
    5. Respond yes to the create new roles prompt.
  3. Create the Dataverse Network database with UTF8 encoding and the new login role (dvnApp) as the owner.
    For example, type the following: ./createdb dvnDb --owner=dvnApp
    Note: If you create the database and user within the psql interactive shell, you must use quotes around the names to preserve case, as in "dvnApp".
  4. Configure PostgreSQL to listen on all available interfaces, to make it accessible from outside the server.
    Edit the file /usr/local/pgsql/data/postgresql.conf.
    Uncomment the lines listen_addresses and port, and change the first line to listen_addresses='*'.
    Be sure to save and exit the configuration file.
  5. Restart PostgreSQL for the new configuration value to take effect:
    1. Stop GlassFish.
      Type /usr/local/glassfish/bin/asadmin stop-domain domain1.
    2. Restart PostgreSQL.
      Type /usr/local/pgsql/bin/pg_ctl restart -D /usr/local/pgsql/data.
    3. To confirm external access to the PostgreSQL port (5432), telnet to <servername> 5432.