Non-Ambari Cluster Installation Guide
Also available as:
PDF
loading table of contents...

Using Hue with Oracle

To set up Hue to use an Oracle database:

  1. Create a new user in Oracle and grant privileges to manage this database using the Oracle database admin utility:

    # sqlplus sys/root as sysdba
    CREATE USER $HUEUSER IDENTIFIED BY $HUEPASSWORD default tablespace “USERS”temporary tablespace “TEMP”;
    GRANT CREATE TABLE, CREATE SEQUENCE, CREATE PROCEDURE, CREATE TRIGGER, CREATE SESSION,
    UNLIMITED TABLESPACE TO $HUEUSER;

    Where $HUEUSER is the Hue user name and $HUEPASSWORD is the Hue user password.

  2. Open the /etc/hue/conf/hue.ini file and edit the [[database]] section (modify for your Oracle setup).

    [[database]]
    engine=oracle
    host=$DATABASEIPADDRESSORHOSTNAME
    port=$PORT
    user=$HUEUSER
    password=$HUEPASSWORD
    name=$DBNAME
    
  3. Install the Oracle instant clients and configure cx_Oracle.

    1. Download and extract the instantclient-basic-linux and instantclient-sdk-linux Oracle clients from the Oracle download site.

    2. Set your ORACLE_HOME environment variable to point to the newly downloaded client libraries.

    3. Set your LD_LIBRARY_PATH environment variable to include ORACLE_HOME.

    4. Create a symbolic link for library expected by cx_Oracle:

      ln -sf libclntsh.so.11.1 libclntsh.so
    5. Install the cx_Oracle python module.

    6. Confirm that the python-setuptools are present on the Hue node, for example:

      rpm -qa | grep python-setuptools

      If the phython-setuptools are not present, install them, using the following command:

      yum install python-setuptools
    7. Install the cx_Oracle module:

      /usr/lib/hue/build/env/bin/pip install cx_Oracle
    8. Upgrade Django south:

      /usr/lib/hue/build/env/bin/pip install south --upgrade
  4. Synchronize Hue with the external database to create the schema and load the data:

    cd /usr/lib/hue
    source build/env/bin/activate
    hue syncdb --noinput
    Hue migrate
    deactivate
  5. Populate /usr/lib64 with Oracle instant-client library files.

  6. Copy the *.so.* files from oracle instantclient directory path to /usr/lib64.