1. [New: Apache Log Parser in Python]
  2. You might be interested Linux Networking also. It does not hurt to take a look.
  3. Back to main page

Step by step Oracle 8.1.7 client installation note on RH 7.2 and RH 7.3

Preface
	Although there tons of good papers and articles compiled by experience user available online, 
I still can't help to put my experience about this topic on my website. Hopefully this page can be some 
help for others and it also help myself too.
	In most places in the note, i don't explain WHY i do it, i just show you WHAT and HOW i do it.
So this note is good for those impatient like myself and want to get something up and running fast without 
knowing why certain things are done certain way.
Scenario
	I have PC installed with Red Hat 7.2 operating system. Now i would like to write some CGI program using Python
to interact with Oracle 8.1.7 database on the network. To do this, i must install Oracle Client software on my PC. 
The following notes describe how i did it and where do i get some information during the process. I also include some 
lookout messages at the end of this note about some problems i encounter and how i solve them. A complete and detail 
installation note can be found at http://www.thomasfly.com/Oranux/ and  http://jordan.fortwayne.com/oracle/817.html.  

Major Section
This installation note is divided into 4 major sections
  1. Java Preparation.
  2. glibc compatibility setup.
  3. Oracle user account.
  4. Oracle 8.1.7 installation source.
A. Java Preparation
  1. Login as root.
  2. Download jdk118_v3-glibc-2.1.3.tar.bz2
  3. Unzip it using "bunzip2 jdk118_v3-glibc-2.1.3.tar.bz2" --> jdk118_v3-glibc-2.1.3.tar
  4. Untar using "tar xvf jdk118_v3-glibc-2.1.3.tar" --> jdk118_v3
  5. Move jdk118_v3 to /usr/local/ directory and create symbolic link as java --> "ln -s /usr/local/jdk118_v3 /usr/local/java"
  6. Done
B. glibc compatibility setup
  1. Login as root.
  2. Download these three rpms a). compat-egcs-6.2-1.1.2.14.i386.rpm b). compat-libs-6.2-3.i386.rpm c). compat-glibc-6.2-2.1.3.2.i386.rpm
  3. Try rpm install on all these three rpms. You may encounter message that the compat-egcs-6.2-1.1.2.14.i386.rpm is older than the compat version comes with RH7.2, ignore it and don't bother it.
  4. Done
C. Oracle user account
  1. Login as root
  2. Create a group --> "groupadd oinstall"
  3. Create a group --> "groupadd dba"
  4. Add oracle user --> "useradd oracle -g oinstall -G dba", then change password for oracle.
  5. Create a directory where all Oracle8i installation go to. In my case, i install in "/home/Oracle8.1.7" directory. So i do "mkdir /home/Oracle8.1.7"
  6. Change ownership of "/home/Oracle8.1.7" to oracle --> "chown oracle.dba /home/Oracle8.1.7"
  7. Change mode of "/home/Oracle8.1.7" --> "chmod 775 /home/Oracle8.1.7"
  8. Check umask value -->"umask" , default value should be 022. If not 022, set it later in oracle user bash_profile.
  9. Login as oracle, add these variable to oracle user .bash_profile.
    ########################bash_profile for oracle user###################
    JAVA_HOME=/usr/local/java
    ORACLE_BASE=/home/Oracle8.1.7/app/oracle
    ORACLE_HOME=$ORACLE_BASE/product/8.1.7
    ORACLE_SID=oradb
    export JAVA_HOME ORACLE_BASE ORACLE_HOME ORACLE_SID
    
    PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin
    CLASSPATH=.:$ORACLE_HOME/jdbc/lib/classes111.zip:$JAVA_HOME/lib/classes.zip
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    
    export CLASSPATH LD_LIBRARY_PATH
    export LD_ASSUME_KERNEL=2.2.5
    . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
    
    #############################################################################
    
  10. This is the complete oracle user .bash_profile i used.
    ####################Complete .bash_profile used###################################
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    
    
    PATH=$PATH:$HOME/bin
    BASH_ENV=$HOME/.bashrc
    
    
    JAVA_HOME=/usr/local/java
    export JAVA_HOME
    
    ORACLE_BASE=/home/Oracle8.1.7/app/oracle
    export ORACLE_BASE
    
    ORACLE_HOME=$ORACLE_BASE/product/8.1.7
    export ORACLE_HOME
    
    ORACLE_SID=oradb
    export ORACLE_SID
    
    
    PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin
    CLASSPATH=.:$ORACLE_HOME/jdbc/lib/classes111.zip:$JAVA_HOME/lib/classes.zip
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    
    export BASH_ENV PATH
    
    #added
    export CLASSPATH LD_LIBRARY_PATH
    export LD_ASSUME_KERNEL=2.2.5
    . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
    
    
    
    unset USERNAME
    ###########################################################################
    
  11. Done
D. Oracle 8.1.7 installation source
  1. Login as root
  2. Download linux81701.tar.gz from technet.oracle.com. Need to signup first.
  3. Unzip and untar it and save it somewhere. After untar, you will get a "Disk1" directory.
  4. Login as oracle user and change to "Disk1" directory.
  5. Run the unversal installer -->"./runInstaller"
  6. Please refer to http://www.thomasfly.com/Oranux/ and http://jordan.fortwayne.com/oracle/817.html for the process of the installation.
  7. Several tips for possible errors and the fixes i used.
           a. At about 97% of linking, you may encounter
               "/home/Oracle8.1.7/app/oracle/product/8.1.7/ctx/lib/ins_ctx.mk" error. 
               This is because the line in "/home/Oracle8.1.7/app/oracle/product/8.1.7/ctx/lib/env_ctx.mk"
               makefile,  which is included in "/home/Oracle8.1.7/app/oracle/product/8.1.7/ctx/lib/ins_ctx.mk",
               misses an option "-ldl" in line 
               "CTXHX_LINKLINE=$(LINK) $(CTXLIB)ctxhx.$(OBJ_EXT) $(INSO_LINK) $(USRLIBS)"
           b. Edit the above line in "env_ctx.mk"  file  to look like this
               "CTXHX_LINKLINE=$(LINK) $(CTXLIB)ctxhx.$(OBJ_EXT) $(INSO_LINK) $(USRLIBS)
               -ldl"
              or you can simply download the replacement "env_ctx.mk" file from  
              http://www.thomasfly.com/Oranux/.   and replace the default
              "/home/Oracle8.1.7/app/oracle/product/8.1.7/ctx/lib/env_ctx.mk". Then hit Retry on
              the popup window. Everything should be fine. 
           c. Toward the end of the installation, you will be asked to run
              "/home/Oracle8.1.7/app/oracle/product/8.1.7/root.sh" to  complete the installation. The default
              "root.sh" is defect. It contains two mistakes. You must edit this file. 
              First look for the line 
                        RMF=/bin/rm -f  
              Threre are two occurances, the first occurance comes with double quote but not the second 
              occurrance.  You must add double quote to the second occurrance to look like this 
                       RMF="/bin/rm -f" 
              The second mistake  is related to this line.
                       RUID=`/usr/bin/id|$AWK -F\('{print $2}'|$AWK -F\) '{print $1}` 
              This line misses a tic (single quote) at the end of the line. Change it to as follow.
                       RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`
              Now you can execute "root.sh" by typing "./root.sh".
            
              Option:
                   You can download "root.sh" from "http://www.thomasfly.com/Oranux" and replace the
                   defective "root.sh".
          
  8. Choose typical configuration when Net8 popup to configure the database.
  9. Done.
Watch Out Messages
  1. Make sure the directory priviledge of your ORACLE_BASE is 775, not 755. My silly mistake cost me two hours.
  2. Verfiy these two lines are in oracle user's .bash_profile.
            LD_ASSUME_KERNEL=2.2.5
            . /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
            
 I do not assume any responsibility for any instructions listed on this page if any disaster should
 occur. Try it on your own risk.
 
Hosted by www.Geocities.ws

1