On the Ambari Server machine, install the Oracle JDBC .jar file:
Download the Oracle JDBC (OJDBC) driver from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html.
Select Oracle Database 11g Release 2 - ojdbc6.jar
Copy the .jar file to the Java share directory
cp ojdbc6.jar /usr/share/java
Make sure the .jar file has the appropriate permissions - 644.
Create the Ambari user, password, and tablespace, and grant the account database permissions:
# sqlplus sys/root as sysdba SQL> create user $AMBARIUSER identified by $AMBARIPASSWORD default tablespace "USERS" temporary tablespace "TEMP"; SQL> grant unlimited tablespace to $AMBARIUSERR; SQL> grant create session to $AMBARIUSER; SQL> grant create table to $AMBARIUSER; SQL> quit;
Where
$AMBARIUSER
is the Ambari user name and$AMBARIPASSWORD
is the Ambari user password.Load the Ambari Server schema:
To set up Ambari Server to load the schema automatically:
Download the Oracle Instant Client (for Linux x-86 or x86-64), Basic and the Instant Client Package - SQL*Plus, version 11.2.0.3.0, on the Ambari Server host.
For information on the Oracle Database Instant Client, see here. To download the x86 client, see here. To download the x86-64 client, see here.
Extract the zip files on your Ambari Server
mkdir /home/oracle cd /home/oracle unzip /tmp/instantclientsqlpluslinux.x6411.2.0.3.0.zip unzip /tmp/instantclientbasiclinux.x6411.2.0.3.0.zip
Update your PATH and LD_LIBRARY_PATH variables. For example, in BASH:
export PATH=/home/oracle/instantclient_11_2:${PATH} export LD_LIBRARY_PATH=/home/oracle/instantclient_11_2:${LD_LIBRARY_PATH}
To load the schema manually, create the Ambari Server schema by running a script:
sqlplus $AMBARIUSER/$AMBARIPASSWORD < /var/lib/ambari-server/resources/Ambari-DDL-Oracle-CREATE.sql
The file
Ambari-DDL-Oracle-CREATE.sql
is found in the/var/lib/ambari-server/resources/
directory of the Ambari Server machine, once you have completed the Set Up the Bits step in the install process. .