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.
- 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.
- Log in as super user and create a new login role for the owner of the Dataverse Network's database.
- Type:
su - postgres
cd /usr/local/pgsql/bin
./createuser -lPE dvnApp
- Enter the password, and then enter it again.
- Respond
no to the superuser prompt.
- Respond
yes to the create databases prompt.
- Respond
yes to the create new roles prompt.
- 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".
- 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.
- Restart PostgreSQL for the new configuration value to take effect:
- Stop GlassFish.
Type /usr/local/glassfish/bin/asadmin stop-domain domain1.
- Restart PostgreSQL.
Type /usr/local/pgsql/bin/pg_ctl restart -D /usr/local/pgsql/data.
- To confirm external access to the PostgreSQL port (5432), telnet to
<servername> 5432.