Recently I joined Sqlstar International for my Oracle DBA course. Everything was going smooth. I completed my SQL Fundamentals with Oracle installed on Windows in my pc. But when classes started for DBA Fundamentals 1 I was at loss, as in my institute oracle was installed on Redhat Linux platform. I could have done all the solution of the text on windows but I decided to configure my own Linux box and install oracle on it to simulate the class environment. So I procured Redhat Enterprise Linux 5 and downloaded Oracle 9i release 2. When I installed Linux and went ahead to install oracle on it, I simply couldn’t. So, for the fear of being labeled as ignorant, I did some googling and found out that RHEL5 doesn’t support Oracle 9i. I had faced lots of troubles to procure RHEL5 and didn’t want to go again in that lonely, long road, so I googled some more, and found out that after modding the RHEL5 box a bit, one can install Oracle on it. So I searched and searched and finally found some articles in some generous genius’s blog where they had written detailed instructions on how to mod the RHEL5 box for Oracle9i installation. My first attempt wasn’t successful. After a few moments of contemplation, I found out that I was using the newer version of JRE which somehow loaths Oracle 9i. So I followed the advice and installed the old JRE and voila, after few tweaks I managed to install the Oracle. I did it twice again to perfect the art. It’s a pity I couldn’t repeat my success at my friend Ahalya and Shantanu’s notebook. That time I couldn’t find out where did I go wrong. But later when I came back to home and reinstalled the combo, it installed smoothly. Besides, when I showed them the source instruction, they couldn’t understand it, and requested me to modify it to suite to their needs. So here I am, modifying the original articles (Sources are mentioned in Reference Section.)
- You know how to operate a Linux Box. (Navigating directories/ knowhow of basic commands)
- You know how to install software modules/libraries (Mostly rpms for RHEL5).
- You have a system installed with RHEL5 or you know how to install it.
- Do not install Virtualization support during RHEL5 installation. I don’t know why but my Oracle 9i Installation behaved erratically whenever this Virtualization module was present in my system. It installs a different Kernel (Xen). So skip it.
- During RHEL5 Installation disable SELinux. If you couldn’t do it in the first place then don’t worry, read ahead to know how to disable it.
1. Installing Oracle 9i on RHEL5 (Logged in as root)
- Disabling SELinux - Disable SELinux now (If you couldn’t disable it during installation).
And make sure to set the SELINUX Flag disabled.
- Installing JRE - Newer version of JRE behaved badly in my Oracle installation, so Download the Java Runtime Enviroment (I used j2re-1_3_1_19-linux-i586.bin) from http://java.sun.com/products/archive/j2se/1.3.1_19/index.html. Fire the command prompt and navigate to the location where you have stored the downloaded file. Most probably it will be Root’s Desktop Directory. So go there.
Give the file, execute permission and then execute it. When the JRE is exracted, move the extracted directory into the "/usr/local" directory.
# chmod +x j2re-1_3_1_19-linux-i586.bin
# ./ j2re-1_3_1_19-linux-i586.bin
# mv jre1.3.1_19 /usr/local/
- Installing missing libraries – You don’t know whether you have the required packages installed or not. Right! Don’t sweat. Run following commands to check whether you have those packages or not. If they are installed, the command prompt will return you their version, else ‘Not installed’ message.
If everything is alright, then it will show the following:
[root@localhost ~]# rpm -q compat-db compat-gcc-34 compat-gcc-34-c++ compat-libgcc-296 compat-libstdc++-296
[root@localhost ~]# rpm -q compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libgcc make libXp
If you get the ‘Not installed’ message with any of the package; then load your installation media (RHEL5 Installation Disk), and run the following commands to install the necessary packages.#cd /media/cdrom/Server
#rpm -Uvh make-3*
#rpm -Uvh glibc-2*
#rpm -Uvh compat-libstdc++-33-3*
#rpm -Uvh compat-gcc-34-3*
#rpm -Uvh compat-gcc-34-c++-3*
#rpm -Uvh gcc-4*
#rpm -Uvh libXp-1*
#rpm -Uvh compat-db-4*
- Installing patches – You need to download two patches and install it. These patches are:
Navigate to the location where you have stored the downloaded file. Most probably it will be Root’s Desktop Directory. So go there.#cd /root/Desktop
#rpm -Uvh compat-libcwait-2.1-1.i386.rpm
#rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm –nodeps
- Now the Workarounds – Some libraries aren’t available for RHEL5, so you can use the substitutes available in the RHEL5 itself. All you have to do is linking. So, here you go.
- #cd /usr/lib
- #ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2
- #cd /usr/bin
- #ln -s gcc34 gcc32
- #cd /usr/lib
- #ln -s libgdbm.so.2.0.0 libdb.so.2
- User and Group Creation – Oracle installer wouldn’t run as the root user, so you need to create a user. It would be better, if you create a special group for Oracle. To do these, run the following commands in the command prompt.
- #groupadd oinstall
- #groupadd dba
- #groupadd oper
- #useradd -g oinstall -G dba oracle
- #passwd oracle
ORACLE_BASE Directory Creation - Login as root and create base directory for Oracle.
- #cd /opt
- # mkdir oracle
- # chown –R oracle.oinstall oracle
- #cd oracle
- #mkdir 920
- Setting Environment Variables – Now since you have created the oracle user, you need to setup its environment variables. For that, you need to update oracle’s .bash_profile file.
Open bash profile of Oracle:#gedit /home/oracle/.bash_profile
Now add the following lines in the file –
PATH=$PATH:$HOME/bin; export PATH ORACLE_BASE=/opt/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/920; export ORACLE_HOME ORACLE_SID=orcl; export ORACLE_SID LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH ORACLE_OEM_JAVARUNTIME=/usr/local/jre1.3.1_19; export ORACLE_OEM_JAVARUNTIME PATH=$PATH:$ORACLE_HOME/bin; export PATH if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
Save and close the file.
- Setting up the kernel parameters– You also need to do a little modification in the the kernel parameters. You need to open the sysctl.conf file -
And add the following lines -
kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
Save and close the file. You need to run a command to update the parameters.
Logout of root and login again as oracle user.
- Download Oracle 9i - Download the Oracle 9i (18.104.22.168) software from Oracle website. Store the files in oracle’s home directory. Launch the command prompt and navigate there.
- Setting Oraparam.ini file - When all archives files are extracted you'll have three directories Disk1, Disk2 and Disk3. Locate the oraparam.ini and update it with new information. Oraparam.ini is in Disk1/install/linux/ directory.
- Starting Oracle Installer – Now you are all set for Oracle installation. In the command prompt go to the Disk1 directory and run runInstaller file.
- One Last Tweak - Now you need to know how to install oracle. Just read the instructions carefully, and select appropriate choices. After few clicks your Oracle will be installed. However you will face a problem during dbca configuration. You will get a screen similar to this.