Configuring PostgreSQL for Oozie

You must install PostgreSQL, create the Oozie user and database, and configure PostgreSQL to accept network connections for the Oozie user.

  1. Install PostgreSQL
    See the PostgreSQL documentation to install it.
  2. Create the Oozie User and Oozie Database.
    For example, using the PostgreSQL psql command-line tool:
    $ psql -U postgres
    Password for user postgres: *****
    
    postgres=# CREATE ROLE oozie LOGIN ENCRYPTED PASSWORD 'oozie' 
     NOSUPERUSER INHERIT CREATEDB NOCREATEROLE;
    CREATE ROLE
    
    postgres=# CREATE DATABASE "oozie" WITH OWNER = oozie
     ENCODING = 'UTF8'
     TABLESPACE = pg_default
     LC_COLLATE = 'en_US.UTF-8'
     LC_CTYPE = 'en_US.UTF-8'
     CONNECTION LIMIT = -1;
    CREATE DATABASE
    
    postgres=# \q
  3. Configure PostgreSQL to Accept Network Connections for the Oozie User.
    1. Edit the postgresql.conf file and set the listen_addresses property to *, to make sure that the PostgreSQL server starts listening on all your network interfaces. Also make sure that the standard_conforming_strings property is set to off.
    2. Edit the PostgreSQL data/pg_hba.conf file as follows:
      host    oozie         oozie         0.0.0.0/0             md5
  4. Reload the PostgreSQL Configuration.
    sudo -u postgres pg_ctl reload -s -D /opt/PostgreSQL/8.4/data