Skip to main content

Installing Oracle 9i on RHEL5. (x86)

I must warn you that this article is as it is. It worked when I was installing the combo - a long time ago. I am not sure about the links available in this article. I am not maintaining this article anymore, (other than sprucing it up a bit for better reading). I am completely out of touch with RHEL or Oracle for that matter. Still, dont lose your heart yet. I am sure, with proper searching using the big brother - Google, you will find lots of more information relating to your work to help you finish what you are doing.
Foreword
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.)

Assuming
  • 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.
Important tips during installation of RHEL5
  • 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).
#gedit /etc/selinux/config
And make sure to set the SELINUX Flag disabled.
SELINUX=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.
#cd /root/Desktop
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.
#rpm -q compat-db compat-gcc-34 compat-gcc-34-c++ compat-libgcc-296 compat-libstdc++-296
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
compat-db-4.2.52-5.1
compat-gcc-34-3.4.6-4
compat-gcc-34-c++-3.4.6-4
compat-libgcc-296-2.96-138
compat-libstdc++-296-2.96-138

[root@localhost ~]# rpm -q compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libgcc make libXp
compat-libstdc++-33-3.2.3-61
gcc-4.1.1-52.el5
gcc-c++-4.1.1-52.el5
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libgcc-4.1.1-52.el5
make-3.81-1.1
libXp-1.0.0-8

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:
http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-libcwait-2.1-1.i386.rpm
http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-oracle-rhel4-1.0-5.i386.rpm

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.
    1. #cd /usr/lib
    2. #ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2
    3. #cd /usr/bin
    4. #ln -s gcc34 gcc32
    5. #cd /usr/lib
    6. #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.
    1. #groupadd oinstall
    2. #groupadd dba
    3. #groupadd oper
    4. #useradd -g oinstall -G dba oracle
    5. #passwd oracle
  • ORACLE_BASE Directory Creation - Login as root and create base directory for Oracle.
    • ($ORACLE_BASE).
    • #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 -
#gedit /etc/sysctl.conf

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.

#sysctl –p

Logout of root and login again as oracle user.


2. Installing Oracle 9i on RHEL5 (Logged in as oracle):

  • Download Oracle 9i - Download the Oracle 9i (9.2.0.4) software from Oracle website. Store the files in oracle’s home directory. Launch the command prompt and navigate there.

$cd /home/oracle
Unzip the files -
$ gunzip ship_9204_linux_disk1.cpio.gz
$gunzip ship_9204_linux_disk2.cpio.gz

$gunzip ship_9204_linux_disk3.cpio.gz
Unpack the cpio files –
$cpio -idmv "<" ship_9204_linux_disk1.cpio
$cpio -idmv "<" ship_9204_linux_disk2.cpio

$cpio -idmv "< "ship_9204_linux_disk3.cpio

  • 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.

$gedit /home/oracle/Disk1/install/linux/oraparm.ini
Modify JRE_LOCATION variable and set it to
JRE_LOCATION=/usr/local/jre1.3.1_19
Save the file and close.

  • Starting Oracle Installer – Now you are all set for Oracle installation. In the command prompt go to the Disk1 directory and run runInstaller file.

$cd /home/oracle/Disk1
$./runinstaller

  • 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.

Don’t lose heart. You need to change the installer’s JRE. Launch the command prompt, and do the following –
$cd $ORACLE_HOME

$rm JRE
$ln -s $ORACLE_BASE/jre/1.3.1 JRE

$cd JRE/bin


$ln -s java jre


$cd i386/native_threads/


$ln -s java jre
When you are done, select DBCA and every failed services and click retry button, one-be-one. Your installation will succeed.
Reference:-



Comments

dEPeCHe said…
Thank you! very interest article,
but what the platform you use? x86 or x64?
Unknown said…
Well, I didn't try x64 configuration. I'm sure that must have a slight different configuration.
David said…
Awesome article. Using your process I was able to successfully install Oracle9i on Oracle Enterprise Linux 5. Thanks!
Unknown said…
I'm glad my blog helped you. :)
Vivek said…
Awesome..
I installed oracle 9i as was in artcile. but how can i open that software in linux.
HOW TO OPEN ORACLE SOFTWARE IN LINUX
Unknown said…
@Vivek
Dude! Check out the link
http://nirajkvinit.blogspot.com/2008/10/starting-up-and-stopping-oracle.html
Unknown said…
do I need to remove the change I made after installation?
I did manage to install oracle 9i on my RHLE5, but then I wanted to install some software on my machines, but I face some problem with Java I think
Unknown said…
Nope WR. You wouldn't want to do that. Well.. to install your application with different java installation you need to export the related javapath temporarily. Once you are done with that you should export the oracle's related javapath.

*Well, If you dont want to do it over and over again while switching from one app to another, you can write one shellscript which will take an argument from you and export(Switch to) the related javapath.
Unknown said…
thanks for your fast response.
I am not an expert on RHL. the problem is when I trey to install my application I have to fill some character in the pop up windows, which come from my application.the problem I can't fill that character, which I think it's Java problem, so would you tell mt in details (step by step) hot to do that?
I will appreciate your help.
Unknown said…
Well WR. Scenario isn't clear. I was online so I could reply you back.
If you could explain your problem in details... I may help you offline by instruction or remote assist you. Better mail me your problem. it's nirajkvinit[at]yahoo[dot]co[dot]in
Anonymous said…
#rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm –nodeps

will be

#rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm –-nodeps
tajinder said…
i m getting error at last stage
"jre was not found in /oracle/jre/1.3.1/bin/i386/native_threads/jre"
it is not installing ONCA ,
ODCA ,ACA ..
i m running rhel 5.1 on vitrual box
tajinder said…
i m getting error "jre was not found in /oracle/jre/1.3.1/bin/i386/native_threads/jre"
it is not installing ODCA,ONCA,ACA
only HTTP server
plz tell me what should i do
Anonymous said…
Thanks for the post.
All went smoothly on my machine except
Agent Configuration Assistant. It failed --> Parameter "nodeinfo" = NO_VALUE - Oracle Server

Plz help.
Unknown said…
Hi Niraj,

The doucment is really nice.I'm getting the belwo error while invoking the ./runinstaller

/tmp/OraInstall2009-10-13-8-21-00AM/jre/bin/i386/native_threads/java:erro while loading shared libraries :libstdc++-libc6.1-1.so.2:cannot open shared object file:no such file or directory.

Please provide us the solution

Note: Im running RHEL 5.3 0n VMware.

Thansk in Advance,
Arvind
Unknown said…
@Maddy.
You need to change the JRE before you run ./runinstaller.

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.

$gedit /home/oracle/Disk1/install/linux/oraparm.ini

Modify JRE_LOCATION variable and set it to

JRE_LOCATION=/usr/local/jre1.3.1_19

Save the file and close.
Unknown said…
i have follow everything in your post.

but i am getting Agent Configuration Assistant Failed error

Parameter "orahome" = /opt/oracle/920
Parameter "nodeinfo" = NO_VALUE
Agent Service Failed

Pls help
Hello niraj, Good blog,
today it helped me a lot, thank you very much. and keep writing.
Unknown said…
@uday bhaskar jalagam
Thanks dude! :)
Anonymous said…
It is remarkable, it is very valuable answer
Anonymous said…
You have to express more your opinion to attract more readers, because just a video or plain text without any personal approach is not that valuable. But it is just form my point of view
Anonymous said…
I didn't understand the concluding part of your article, could you please explain it more?
Rajat said…
Hi Niraj


Thanks for this blog. I am trying to install as stated by you. but getting the error Exception in thread "main". And the installation getting hang in between. Please help to resolve the issue.
Anonymous said…
I am trying to install with the steps mentioned above, however when i click the install after the runinstaller, i get the error.. link pending and copying README while installing JRE 1.1.8. Is there any solution to this???
Anonymous said…
Thanks a lot
its a magical description for installing oracle.
I have install oracle by reading your blog so many time and i was success too
but sometime i face a problem
when i was trying to change the installer`s JRE.
$cd $ORACLE_HOME
$rm JRE
rm: cannot remove `JRE/': Not a directory
Then i remove this in graphically by shift+delete
then it work
please tell me the reason
I have another question
can you tell me something about kernel parameters .because i face this question once in my interview.
i dont know exactly the meaning of kernel parameters and how these parameters work
Thanks
benq-java said…
installation hungs when copying readme on javaruntime.. I had /usr/local/jre1.3.1_19 and I had modified Disk1/install/linux/oraparam.ini to change JRE_LOCATION=/usr/local/jre1.3.1_19
I use CentOS 5.5
Anonymous said…
GREAT !!!! THNX !!!!
Beta said…
I have just installed Oracle 9i, thank you for this install guide.
Unknown said…
You are welcome! :)
Bilal said…
Hi Niraj,

Awesome article. I was able to install oracle 9.2.0.4 and patch it to 9.2.0.6 and create a database.

But upon starting the database i get the following error

ORA-00205: error in identifying controlfile, check alert log for more info

Much appreciated
Bilal
Unknown said…
Thanks Bilal for your appreciative comment. I am glad that the article was of some help to you.

About your last problem, I am sorry, I can't be of much help to you. It's been a long time since I left working on Oracle and Linux.
[oracle@orahome Disk1]$ ./runInstaller
[oracle@orahome Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-11-03_10-52-43AM/jre/bin/java. Please wait...
Error: can't find libjava.so.
Raghu said…
Hi Niraj,

i am installing 9i on RHEL5 the setup strucks at

Installing java runtime enviroment 1.1.8.1.0
Link pending

screenshot:
file:///home/oracle/Desktop/Screenshot.png


plz can you help me...

Thanks & Regards
Raghu
Unknown said…
Dear Raghu,
It's been many years since I wrote this article. I have moved to a totally different field and have forgotten all about RHEL5 and Oracle Installation. I am afraid, I cannot help you in this regard. Please read the article carefully and try to find the answer within the article.

I remember only one thing that I had installed Oracle 9i on RHEL5 multiple times successfully by following the steps written in the article.

So, try and try again when you fail. Also introspect your own process. You'll find your answer.

Regards,
Niraj Kumar

Popular posts from this blog

Datatables and Wordpress Integration problem solved.

Note: Download a working demo plugin from this project's github repository . Like other wordpress developers, I had also faced the problem of integrating datatable (server side processing) with wordpress. I tried every tips, tricks and multiple ways to solve the problem, but couldn't do it. My ajaxified functions of the wordpress simple dint work. I din't have much time and had to finish a small project on time. So, I decided to skip it and go through the developer's way : the plugin developer had suggested and implemented. I dropped the required php file with some related modifications and called the url of the php file in the datatable options in my project. It worked after few small hiccups. I wasn't satisfied though, as i wanted the wordpress centric solution, instead of using some drop-in file to complement the functionality. I had vowed to look after this problem whenever I could get some time. (You may visit the url http://www.bearinghouse.net/orde

Web Development Dilemma - Part 2

Recently, I got a Job to build an ERP Application (More like Accounting Package with CRM). I started planning for the Application. I had some experience with Tally.ERP 9 and knew a bit about Accounting too. Once again I chose Wordpress Platform for the application development, as I was more comfortable with it. Application was to have multiple advanced features along with some of smart automated data sensing and processing, and selective data push (Semi-Automated) to Tally for Accounting Purpose. The application was to run in a LAN Environment and was connected with the Customer's Website to retrieve Customer Order submitted on the website (Customized Shopping Cart) for further processing.  I could develop fast in Wordpress, I was familiar with the system and environment. But due to multiple distractions, and tedious job (I hadn't anticipated lengthy coding and timing involved), the project had to be scrapped by the customer. The customer was gracious enough to forgive me