Thursday, May 24, 2012

How to: Complete OBIEE 10g installation Linux Part 1 of 4 - Configuration of JDK for Oracle Business Intelligence

Consider the following scenarios:

* You receive a request to demo  Oracle Business Intelligence on a firm's local network
* A new code migration process requires multiple environments for validation
* New security protocols are implemented which requires developers to use their local machine for all pre-UAT work

What is the commonality in the above scenarios? Each requires you install, configure, set up a complete OBIEE 11g stack.

The ability to do this is so critical to the success and self worth of an OBIEE practitioner, that I have decided to create a series of tutorials on how to set up, install and configure a complete OBIEE 10g solution, commonly referred to as a '10g stack'.

The installation of an OBIEE 10g stack can be summarized in the following steps:


1) Configuration of JDK for Oracle Business Intelligence 
2) Set up of the Oracle Business Intelligence Server
3) Set up of the Oracle Business Intelligence Presentation Services
4) Set up of the Oracle Business Intelligence Client Tool set

This post will focus on step 1 which is really a prerequisite to the installation of Oracle Business Intelligence Server. I made this its own step because it is critical to the success of the installation, and if done incorrectly, will make steps 2 through 4 a nightmare.

To successfully complete this how-to, you will need:

1) a basic understanding of fundamental unix commands specific to the redhat distribution (see: http://bsd.org/unixcmds.html )

2) a basic understanding of vi (see: http://www.washington.edu/computing/unix/vi.html )

3) ability to access root on your linux box  (or have your sys admin perform certain commands on your behalf)

4) a redhat RHEL 5.x box

5) the willpower to not give up when things go wrong, because if this is your first time doing this, you will mess up :)

--
Let's begin.
 

Step 1: Confirm JDK 1.5.0 or higher is not installed

Redhat RHEL 5.4 comes installed with JRE 1.6 which is not the same as JDK 1.5 . JRE contains the run time binaries needed to run java applets , JDK contains the APIs needed to execute java functions in your application.

We need JDK because in an OBIEE 10g basic installation, J2EE is the Application Server.

To start, open your terminal:

in terminal, run :

java -version

it will generate
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

in terminal, run:

echo $JAVA_HOME

it will generate no result. $JAVA_HOME is an environmental variable that you configure during your JDK installation. Since neither java -version or echo $JAVA_HOME mention JDK,  we can confirm that you do not have JDK installed


Step 2: Download Java Development Kit 5.xx

Download the binary file :

http://download.oracle.com/otn/java/jdk/1.5.0_22/jdk-1_5_0_22-linux-i586-rpm.bin

You need to make this file executable. This can be done by changing the permissions.

In terminal, run:


chmod a+x jdk-1_5_0_22-linux-i586-rpm.bin
 
 
Step 3:  Create appropriate folders
We need to move the file to the folder that OBIEE utilizes during install - /usr/local/java. This folder doesn't exist by default so you will have to create it.

In terminal, run:

mkdir /usr/local/java/
cd /usr/local/java/ 
Note that your account may not have privileges to create a new folder in a system-wide directory, so you may need your sys admin to do this for you.

Now you need to move the  jdk-1_5_0_22-linux-i586-rpm.bin file you downloaded into the /usr/local/java folder.

In terminal, run:

mv /desktop/jdk-1_5_0_22-linux-i586-rpm.bin ./

The above statement assumes you downloaded the file to your /usr/home/username/Desktop folder.


Step 4: Install JDK 5.xx

Now that you've moved the file to the /usr/local/java/ folder, we can begin the install:

In terminal, run:

./jdk-1_5_0_22-linux-i586-rpm.bin
 
 
If successful, you will see the following:

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
  inflating: jdk-1_5_0_22-linux-i586.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]

Done.
 

Step 5: Create an account with read/write privilege to /usr/local/java 

If you've been paying attention, you'll notice that all of the above commands had to be executed by either 'root' or a super user. You cannot install OBI as root, nor should you attempt to run a server as root due to security concerns.

The appropriate solution is to create a new user with access to the folders needed for installation.

We are now going to create a new user which we will use for the rest of the installation.

Have your admin/root account run the following commands in terminal:

groupadd oinstall #create a group called oinstall
/usr/sbin/useradd obi -g oinstall  #create a user called obi, with membership to group oinstall
passwd obi #create a new password for user obi
 
Now give user obi read/write access to the /usr/local/java folder. This is necessary because during the start of BI presentation services, log files will be created and .jar files will be executed.

In terminal, run the following command:

chown -R obi:oinstall /usr/local/java
chmod -R 777 /usr/local/java
cd /usr/local
ls -l

Command ls -l should generate:
drwxrwxr-x  3 obi  oinstall 4096 May 23 13:42 java

User obi now has read/write access to /usr/local/java
 
Step 6: Update the bash profile for user obi

 Remember in step run, when we ran echo $JAVA_HOME , no results were returned? This is not ok because $JAVA_HOME is an environmental variable that OBIEE server uses during its install. We need to create this variable prior to installing OBIEE Server.
As I stated earlier, OBIEE Server cannot be installed on root. We created a user obi which we will utilize during installation. So we need to modify the bash profile for user obi.

Log out of your current user, and into user obi.

In your bash shell terminal, run the following command:

vi ~/.bash_profile
 
and modify it to include:
 
# Java Home
JAVA_HOME=/usr/java/jdk1.5.0_22
export JAVA_HOME
 
I assume you have a basic understanding of how to use vi, if not review http://www.washington.edu/computing/unix/vi.html prior to attempting this.

After you save your changes, restart your machine , log back into obi and in terminal , run:


echo $JAVA_HOME

you should get the following output:
 
/usr/local/java/jdk1.5.0_22 

 
--

You now have:
1) JDK installed
2) a user called obi
3) user obi has access to /usr/local/java folder
4) user obi has an environmental variable called JAVA_HOME

Notice how we haven't even downloaded or installed OBIEE yet. This is fundamental pre-work that must be done. Take the time to understand this and do not proceed until echo $JAVA_HOME is populated and obi user has read/write access to /usr/local/java.


4 comments:

  1. And with Linux ! I'm not a big fan of Linux then I appreciate.

    Just a little question, why did you restart the machine ?

    Cheers
    Nico

    ReplyDelete
  2. Nico,

    Thanks for the kind words, you're huge in the OBIEE community. I tried running 'source .bash_profile' to make the changes take effect immediately but running echo $JAVA_HOME returned nothing. Tried this on multiple machines but no luck, so I restarted the machine and viola , echo $JAVA_HOME returned the jdk path.

    John

    ReplyDelete
  3. I really need a consultant to do this type of job, with some training for the team. If anyone is available for some extra work please reach out to: mfesl@syslogictech.com

    ReplyDelete