Command Line Installation
Also available as:
PDF
loading table of contents...

For Oracle

(See "Metastore Database Requirements" in Chapter 1 of this guide for supported versions of Oracle. For instructions on how to install the Oracle database, see your third-party documentation.)

  1. Install and start Oracle 11g.

  2. Create the Oozie Oracle user.

    For example, using the Oracle SQL*Plus command-line tool:

    $ sqlplus system@localhost
    Enter password: ******
    SQL> create user oozie identified by oozie default tablespace users temporary tablespace temp;
    User created.
    
    SQL> grant all privileges to oozie;
    Grant succeeded.
    
    SQL> exit
    $ 
  3. Create an Oracle database schema for Oozie to use:

    1. Set oozie.service.JPAService.create.db.schema to true and set oozie.db.schema.name=oozie.

    2. Edit the oozie-site.xml file as follows:

      <property>
           <name>oozie.service.JPAService.jdbc.driver</name>
           <value>oracle.jdbc.driver.OracleDriver</value>
      </property>
      
      <property>
           <name>oozie.service.JPAService.jdbc.url</name>
           <value>jdbc:oracle:thin:@localhost:1521:oozie</value>
      </property>
      
      <property>
           <name>oozie.service.JPAService.jdbc.username</name>
           <value>oozie</value>
      </property>
      
      <property>
           <name>oozie.service.JPAService.jdbc.password</name>
           <value>oozie</value>
      </property> 
    [Note]Note

    In the JDBC URL property, replace localhost with the hostname where Oracle is running and replace oozie with the TNS name of the Oracle database.

  4. Add the Oracle JDBC driver JAR to Oozie. Copy or symlink the Oracle JDBC driver JAR in the /var/lib/oozie/ directory:

    ln -s ojdbc6.jar /usr/hdp/current/oozie-server/lib

    [Note]Note

    You must manually download the Oracle JDBC driver JAR file.

  5. Modify the following properties in oozie-env.sh to match the directories created:

    export JAVA_HOME=/usr/java/default
    export OOZIE_CONFIG=${OOZIE_CONFIG:-/usr/hdp/2.6.0.0-$BUILD/oozie/conf}
    export OOZIE_DATA=${OOZIE_DATA:-/var/db/oozie}
    export OOZIE_LOG=${OOZIE_LOG:-/var/log/oozie}
    export CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/2.6.0.0-$BUILD/oozie}
    export CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}
    export CATALINA_PID=${CATALINA_PID:-/var/run/oozie/oozie.pid}
    export OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
    export OOZIE_CLIENT_OPTS="${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5"
    export CATALINA_OPTS="${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m"
    export JAVA_LIBRARY_PATH=/usr/lib/hadoop/lib/native/Linux-amd64-64 
  6. On your Oozie server, create the config directory, copy the configuration files, and set the permissions:

    rm -r $OOZIE_CONF_DIR;
    mkdir -p $OOZIE_CONF_DIR; 
  7. Copy all the config files to $OOZIE_CONF_DIR directory.

  8. Set appropriate permissions:

    chown -R $OOZIE_USER:$HADOOP_GROUP $OOZIE_CONF_DIR/../ ;
    chmod -R 755 $OOZIE_CONF_DIR/../ ; 

    where:

    • $OOZIE_CONF_DIR is the directory to store Oozie configuration files. For example, /etc/oozie/conf.

    • $OOZIE_DATA is the directory to store the Oozie data. For example, /var/db/oozie.

    • $OOZIE_LOG_DIR is the directory to store the Oozie logs. For example, /var/log/oozie.

    • $OOZIE_PID_DIR is the directory to store the Oozie process ID. For example, /var/run/oozie.

    • $OOZIE_TMP_DIR is the directory to store the Oozie temporary files. For example, /var/tmp/oozie.

    • $OOZIE_USER is the user owning the Oozie services. For example, oozie.

    • $HADOOP_GROUP is a common group shared by services. For example, hadoop.