Installing Oracle 10gR2 on Ubuntu

Currently i am trying to put a VCM Portal self sustaining installation on Ubuntu. i have tried it with the Oracle eXpress but had some problem with missing librarys i decided to go with the normal oracle installation the next install run.
I have done the installation and now i have an Ubuntu running Oracle 10.2.0.3 10gR2.
Hope this one is helpful to you guys.

Step One

To make this installation a success we need to have an X server. so on your desktop computer, if you run Linux, allow X connections from your (soon-to-be) database server to your desktop. If you happen to be using Ubuntu Desktop for this installation then:
Open Terminal and type xhost +[IP of your pc].
If you are running Ubuntu desktop and installing on an Ubuntu server then go to System -> Administration -> Login Window, select the Security tab and uncheck the box next to “Deny TCP connections to the Xserver”. You will have to restart your Xserver for this change to take effect. To do that you need to logout and login again.
Call in Terminal on your Desktop after login was completed (replace 192.168.x.y with your ip)
Run in Terminal:xhost +192.168.x.y
you should see this message appearing after the call192.168.x.y being added to access control list

Step Two

Upgrade all packages.
Run in Terminal:sudo su -
*(sudo su – effectively makes us root with a new/empty session)
Run in Terminal:apt-get update
The following response (short version removed many lines since the size was over whelming) should appear after you have called the update line:Hit http://security.ubuntu.com hardy-security Release.gpg
Ign http://security.ubuntu.com hardy-security/main Translation-en_US
Hit http://us.archive.ubuntu.com hardy Release.gpg
Ign http://us.archive.ubuntu.com hardy/main Translation-en_US
(...)
ldconfig deferred processing now taking place
You can also get all this done remotely from your Desktop (if running linux as your desktop and configured the X Server to be your host) using SSH. All you need to do is connect to your system.
Run in Terminal:ssh [email protected]
it will ask for password,[email protected]'s password:
Type it in and you are done. The response should look like this:Linux hardy 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu May 1 21:45:05 2008 from 192.168.w.z
[email protected]:~$
Run also the apt-get dist-upgrade to verify you don’t need to installs a new kernel version.
Run in Terminal:apt-get dist-upgrade
During the installation you might get a few questions regarding the download of sizeable install files. Please accept them.
If it did install a new kernel it’s a good idea to reboot the box before proceeding.
Issue the reboot command as root.

Step Three

Once the machine is back up, you should log in again and install the required packages for the installation of oracle
The packages are:

build-essential

libaio1

gawk

ksh

libmotif3

alien

libtool

lsb-rpm

To do so type in, after login, the following line as root:apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm
During the installation you might get a few questions regarding the download of sizeable install files. As usual please accept them

Step Four

After all those packages and updates are installed, you need to change a few configurations. First of all, change the default replacement for sh from dash to bash.
Do not skip this step! If skipped you may get strange errors during install.
Run in Terminal:cd /bin
ls -l /bin/sh
Verify that the response has this link in it:lrwxrwxrwx 1 root root 4 2008-09-03 11:59 /bin/sh -> dash
Run in Terminal:ln -sf bash /bin/sh
ls -l /bin/sh
Verify that the response has changed the link in it:lrwxrwxrwx 1 root root 4 2008-09-03 12:01 /bin/sh -> bashStep Five
Now we need to add a few things to the system. We will start with adding a user for the oracle DB called “oracle”. Before adding oracle to the system we need to create a few groups for the install:
Run in Terminal:cd ~
pwd
The response should look like this:/root
Add the oinstall group for the installation procedure:
Run in Terminal:addgroup oinstall
The response should look like this:Adding group `oinstall' (GID 1001) ...
Done.
Add the dba group for the installation procedure:
Run in Terminal:addgroup dba
The response should look like this:Adding group `dba' (GID 1002) ...
Done.
Add the nobody group for the installation procedure:
Run in Terminal:addgroup nobody
The response should look like this:Adding group `nobody' (GID 1003) ...
Done.
Modify nobody user to join the new group so the Oracle installer will not get confused.
Run in Terminal:usermod -g nobody nobody
Add the oracle user and associate it with the new groups.
Run in Terminal:useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
Now set the oracle user password.
Run in Terminal:passwd -l oracle
Type in the desired password, the response to it should look like this:
Password changed.
Create the oracle Home folder and change the ownership to the oracle user
Run in Terminal:mkdir /home/oracle
chown -R oracle:dba /home/oracle
At this stage we will create some symbolic links to some needed applications we have installed earlier in the guide.
Run in Terminal:ln -s /usr/bin/basename /bin/basename
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm

Create this folder and create symbolic links to it so oracle finds everything where he thinks it should be
Run in Terminal:mkdir /etc/rc.d
for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
Now create the ORACLE_BASE folder
Run in Terminal:mkdir -p /u01/app/oracle
chown -R oracle:dba /u01

Step Six

Now you need to add defaults to our system conf files, these will change some defaults in the Ubuntu system, add the following to the end of /etc/sysctl.conf
To do so we need to be root and Run in Terminal:gedit /etc/sysctl.conf

This will enforce the limits we added to /etc/security/limits.conf
Now you have two choices to get the new values sysctl.conf loaded: Either reboot the machine or as root run in Terminal:sysctl -p

Step Seven

Go to the folder where you have unzipped the Oracle linux installation. Here it is/home/oracle.
Now switch to the oracle user either through su to the oracle user or logout and login as oracle.
If you are switching to the user using su use this step if not skip to the next one.su - oracle

if you get the following response you can ignore it since this has no effect on the install of oracle.

/runInstaller -ignoreSysPrereqs
After a few moments, the Oracle Universal Installer (OUI) will show up.
If the OUI has failed to start and you get this problem:Cannot Open Display
You can try a few solutions:
If you are SSHing to the server and relying on your machine try to Run in terminalxhost +
This might solve the problem.
If you are logged in as a user other then oracle on the server and have an x windows session on it try the same and see if this solves any issues.
From here you have to run the OUI installer
I will not cover it in this post but when you reach the end of the installer and a popup appears look very carefully and see if it is a popup asking you to run 2 scripts as root.
If it is then issue su - root and start a root session then run the 2 scripts:/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.1.0/db_1/root.sh