SUNScholar/Disaster Recovery/Preparation

From Libopedia
Revision as of 14:20, 10 August 2012 by Hgibson (talk | contribs) (Created page with "==PostgreSQL Database Credentials== Create a credentials file for the postgres or dspace user. See: * http://www.postgresql.org/docs/8.4/interactive/libpq-pgpass.html * http://ww...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PostgreSQL Database Credentials

Create a credentials file for the postgres or dspace user. See:

Open a terminal on the server and type the following:

To become the postgres user.

su - postgres

To create the credential file type.

touch ~/.pgpass

To lock down file permissions type.

chmod 0600 ~/.pgpass

Now type.

nano ~/.pgpass

Copy and paste the following into the file:

localhost:5432:dspace:dspace:dspace

Press CTL+O and CTL+X to save and exit the file.

To test type.

psql

You should be connected to the database now.

To quit the database type.

\q