Administering Ambari
Also available as:
PDF
loading table of contents...

Using Oozie with PostgreSQL

Before using Oozie with a new or existing PostgrSQL database; obtain the appropriate driver and .jar files, and create a Oozie user with sufficient permissions.

Determine the appropriate database version and obtain the release drivers and .jar file.
  1. On the Ambari Server host, stage the appropriate PostgreSQL connector for later deployment.
    1. On the Ambari Server host, Download the PostgreSQL JDBC Driver from PostgreSQL.
    2. Confirm that .jar is in the Java share directory.
      ls /usr/share/java/postgresql-jdbc.jar
    3. Change the access mode of the .jar file to 644.
      chmod 644 /usr/share/java/postgresql-jdbc.jar
    4. Execute the following command:
      ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar
  2. Create a user for Oozie and grant it permissions.
    using the PostgreSQL database admin utility:
    echo "CREATE DATABASE [OOZIE_DATABASE];" | psql -U postgres
    echo "CREATE USER [OOZIE_USER] WITH PASSWORD '[OOZIE_PASSWORD]';" | psql -U postgres
    echo "GRANT ALL PRIVILEGES ON DATABASE [OOZIE_DATABASE] TO [OOZIE_USER];" | psql -U postgres
    Where [OOZIE_USER] is the Oozie user name, [OOZIE_PASSWORD] is the Oozie user password and [OOZIE_DATABASE] is the Oozie database name.