Installing Oracle 8.1.7 EE - Red Hat Linux 7.1 from scratch HOWTO Scott Baker, contact: scott@pawprint.net $Revision: 1.5 $ $Date: 8/30/2001$ This document describes how to install Oracle 8.1.7 Enterprise Ed. on a server running Red Hat Linux 7.1 (2.4 kernel) using CDs created from Oracle install images. This document is sometimes distributed in an archive that includes many of the files mentioned herein ______________________________________________________________________ Table of Contents 1. Introduction 1.1 Why I wrote this 1.2 My Home System 1.3 The Example System 1.4 But, My system is nothing like that! 2. Additional Prerequisites and Info 2.1 Is there a Web Site about this 3. Red Hat Install 3.1 Partitions 3.2 Install Choices 3.3 Complete the install 3.4 What about Kernel Parameters? 4. Get Ready for Oracle 4.1 Create Groups 4.2 Create Users 4.3 Mount Points - Discussion 5. Glibc Compatibility 5.1 What's this then? 5.2 Download and Install the packages 6. Java JRE 7. Bash Profile 8. Start the Install 9. Not done yet :) 10. What if it didn't work? ______________________________________________________________________ 1. Introduction 1.1 Why I wrote this I am writing this document because it took me about 5 months to get Oracle installed on one of my machines at home - Why did it take so long? - In part because I actually followed some of Oracle's Instructions - and in part because I was so scared from all that I had read about the install being a nightmare that I neglected to consider that the problems I was having could be anything other then mistakes on my part - as it turned out my install image was corrupt! I hope this will assist those people trying to install Oracle on a 2.4 kernel with their woes and also in finding the files required - I'll keep them in the locations mentioned as long as I can. 1.2 My Home System The first Linux system I got Oracle running on is a Dual PIII (1GHz) Dell server with 512MB RAM and three 9GB U160 SCSI drives in a software RAID-0 config. It has served well and continues to do so with 2 Oracle instances of 4GB each. 1.3 The Example System This document was writing during the install of a production system using a Compaq Dual PIII server (933Mhz) and 1GB RAM with 2 18GB Wide Ultra SCSI drives in a hardware RAID-1 Config. 1.4 But, My system is nothing like that! Hardware specs really should matter, provided that your system has enough juice to run Oracle the steps listed here should work. ______________________________________________________________________ 2. Additional Prerequisites and Info 2.1 Is there a Web Site o My site: http://www.pawprint.net/linux/oracle817.php This site is referenced later in the document as a location to get some of the install files that will be required during the install. o Get information from oracle at: http://www.oracle.com/ and http://technet.oracle.com/ o Get Information from Red Hat at: http://www.redhat.com/ ______________________________________________________________________ 3. Red Hat Install 3.1 Partitions Not being a big fan of over partitioning the 18GB drive in the example system was configured as follows: / = 500MB /boot = 50MB / = fill remaining space 3.2 Install Choices Oracle instillation requires the Korn shell (ksh) this is usually installed by default in almost any config - but ensure you don't turn it off. Other then that Red Hat 7.1 can be installed however you want it to be, Just ensure that sufficient space remains for the Oracle application and your database. A Red Hat custom install is probably best, it's probably worth going through the - Choose Individual Packages step to turn off/on all the ones you don't/do want and save some space. Details of installing Linux are outside the scope of this document. 3.3 Complete the install Ensure the Linux install was successful and complete. It's probably a good idea to configure network access to the box now - things like SSH, FTP, Samba etc... depending on your application. The complete install on the example system took about 30 mins. 3.4 What about Kernel Parameters? A lot of other HOWTOS on Oracle mention something to the effect that you must re-compile the Linux kernel if you want to tune your shared memory settings as Oracle recommends - this is, well, to put it mildly: complete B$! Linux even provides a utility to do it 'sysctl' So I wrote a short script that will do it for you - but you will need to change the variable settings to match your system. Just see the comments at the bottom of the script for details. o http://www.pawprint.net/linux/set_oracle_kernel_params.sh That said - unless you are running a production system these settings appear to be completely unnecessary - as I ran my initial server without any tuning for a month (including some fairly hefty db work) before I changed them. ______________________________________________________________________ 4. Get Ready for Oracle The following steps must be done as root: 4.1 Create Groups The following groups are required for Oracle Install: o dba - all oracle users and others that will mess with oracle should be a member 4.2 Create Users The following users are required for Oracle Install: o oracle - this user will own the oracle software o oinstall - this is a user to make changes to the oracle software 4.3 Mount Points - Discussion The Oracle OFA structure uses mount points for the application and datafiles. Oracle calls these /uxx where xx is a number. The database I work with is structured with 22 mount points - however the OFA requires only a minimum of 4: one for the application and 3 for the database. Oracle suggests that these mount points be physical drives - for performance reasons - but the majority of people don't have that many drives. 4.4 Mount Points - Recommendation The following are my recomendations for a 22 mount point database and relate to the scripts in this document. You can configure it any which way you like however. if you don't have 22 physical drives :) o /oracle - either a separate dir or a link to /home/oracle o /oracle/u01 through /oracle/u22 for the Oracle OFA file structure if you have a /oracle setup the following script will do what you need #!/bin/sh # a simple Unix shell script for setting up to install Oracle 8.1.7 cd /oracle mkdir -p u01 u02 u03 u04 u05 u06 u07 u08 u09 u10 u11 mkdir -p u12 u13 u14 u15 u16 u17 u18 u19 u20 u21 u22 chown -R oracle.dba /oracle chown -R oracle.dba /home/oracle you can even download it: http://www.pawprint.net/linux/setup_groups.sh if you _do_ have 22 physical drives then mount them as /u01 through /u22 ______________________________________________________________________ 5. Glibc Compatibility 5.1 What's this then? Oracle's code is designed to link to a library (glibc) version 2.1, but Red Hat 7.1 (the Linux 2.4 kernel) now includes glibc 2.2, which is, effectively - too new for Oracle 8.1.7. These packages are used to provide backward compatibility to the glibc 2.1 library. 5.2 Download and Install the packages Easier said then done... Good luck if you tried to follow Red Hat's instructions on this one! The 7.1 release notes include a 1 page document "Last Minute Changes" that talks about Oracle in 1 paragraph. They list the 3 packages you need (but don't try to search for them on the Red Hat site - you won't find them) and then mention a script to run after you have installed them... Well, I finally found the packages on the 7.1 CD, installed them and went to run the script - and lo, it didn't exist! wonderful! Luckily I found other good souls on the net that had somehow found out how to get this all to work, and here is how to do it: The following steps must be done as root: Download the 3 packages: o http://www.pawprint.net/linux/compat-glibc-6.2-2.1.3.2.i386.rpm o http://www.pawprint.net/linux/compat-libs-6.2-3.i386.rpm o http://www.pawprint.net/linux/compat-egcs-6.2-1.1.2.14.i386.rpm and install in the same order. ______________________________________________________________________ 6. Java JRE Oracle is _REALLY_ specific about which Java it wants. You MUST install the IBMJava 1.1.8 version and no other in order for the Oracle installer to work. you can get it here (cuz you won't find it from IBM - I even asked people who work in their Java division and they couldn't find it!) http://www.pawprint.net/linux/IBMJava118-SDK-1.1.8-5.0.i386.rpm The following steps must be done as root: Install this too. Oracle wants to see this at /usr/local/java so you will also need to: ln -s /usr/jdk118 /usr/local/java ______________________________________________________________________ 7. Bash Profile Remember Red Hat's instructions I mentioned in the glibc section? the following bash-profile runs a script shell-mods.sh that will do what the other was supposed to do. remember to rename the bash-profile.txt back to .bash-profile place this in the oracle user's home dir http://www.pawprint.net/linux/bash-profile.txt place this in /etc/ http://www.pawprint.net/linux/shell-mods.sh You can look into the files if you want to know what they do. ______________________________________________________________________ 8. Start the Install 8.1 Install Notes Because Oracle is a glibc 2.1 app the automatic database creation step will not work in the installer. It's probably best to manually create a database afterwards anyway - you will get a cleaner install - especially for a production server. 8.2 Start Login as oracle and ensure all the environment variables are set by issuing a set command. insert the 8.1.7 cd and execute the runInstaller from a terminal. 8.3 Install Progress Unix group for update permissions: dba Choose a CUSTOM install and turn off 8.3 First Hangup. Everything should proceed normally until near the end of the makefile step (this took about 12 mins on the example server) One of the Oracle files has a bug and there are 2 ways to fix it :) o Near the end of the makefile process - as soon as the file env_ctx.mk exists in the $ORACLE_HOME/ctx/lib path copy over it with this one: http://www.pawprint.net/linux/env_ctx.mk o Or you can wait for it to fail go to the file $ORACLE_HOME/ctx/lib/env_ctx.mk and change the line CTXHX_LINKLINE=$(LINK)$(CTXLIB)ctxhx.$(OBJ_EXT)$INSO_LINK)$(USRLIBS) to include a '-ldl' on the end. I prefer the first method - to avoid any errors. 8.4 Second Hangup. The root.sh script that the installer creates is flawed :) a replacement can be found here: http://www.pawprint.net/linux/root.sh modify the $ORACLE_HOME values in this script before you run it (note: ORACLE_HOME=... occurs TWICE) this can be copied over $ORACLE_HOME/root.sh while the installer is busy linking. You may then run it as the installer requests and there should be no errors. ______________________________________________________________________ 9. Not done yet :) Oracle has a fix to complement the glibc issues, you can get it here: http://www.pawprint.net/linux/glibc-2.1.3-stubs.tar.gz complete the following steps logged in as oracle o copy the above file to $ORACLE_HOME o "tar -xvzf" it. o run the setup_stubs.sh script if you're still with me - then you did it! ______________________________________________________________________ 10. What if it didn't work? you poor bastard... perhaps there will be some help at: http://www.pawprint.net/linux/oracle.php