Skip to content

ESGFNode|ScriptDetails|Postgres

Stephen Pascoe edited this page Apr 9, 2014 · 5 revisions
Wiki Reorganisation
This page has been classified for reorganisation. It has been given the category MOVE.
The content of this page will be revised and moved to one or more other pages in the new wiki structure.

ScriptDetails: Postgres

This step downloads, compiles and configures a Postgres database system on the node.

It first checks for an existing installation of postgres in /usr/local/postgres . If one doesn't exist the distribution package is downloaded from the Postgres site and the package is compiled. If the \--upgrade flag has been used the database is stopped and restarted.

If a UNIX user and group "postgres" doesn't exist it is created and the installation directory is chown'd to that user. It writes the password for this account into /esg/config/.esg_pg_pass with restricted read access.

Note: This password is automatically set to the same one as the system admin password by the function initial_setup_questionnaire().

If the configured database superuser (usually "dbsuper") doesn't exist it is created You will be asked for the name and password of this user. The configuration files pg_hba.conf and postgresql.conf are downloaded from the esg distribution site. The tokens @@postgres_host@@ and @@postgres_port@@ are replaced in these files with configured values.

Configured environment variables are written to /etc/esg.env. These include PGHOST, PGPORT, PGUSER and PGHOME.

NOTE: The database superuser (dbsuper) is a different user than the user created via the Publisher installation (esgcet). You are asked to set the esgcet Publisher user's password (and confirm it). The password may or may not be the same as the dbsuper password - which may or may not be the same as the node 'admin' password.

BASH Functions

setup_postgress start_postgress stop_postgress test_postgress write_postgress_env write_postgress_install_log test_postgress

Questions asked of user

  1. Password for postgres system account (i.e. a UNIX user) unless set in initial_setup_questionnaire

  2. Username of database superuser. Default dbsuper

  3. Password for the database superuser.

  4. Postgres host. Leave as default.

  5. Postgres port. Leave as default.

NOTE:
The host default value of "localhost" should be used when installing locally (default)
Clone this wiki locally