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 call
192.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 -> bash
Step 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

Paste at the end of the file the following lines:

fs.file-max = 65535 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65535 net.core.rmem_default = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 262144

These lines do the following:
Extend the total number of file descriptors on a system
Extend size of shared memory.
Change the networking subsystem port range.

Using gedit open /etc/security/limits.conf and add this to the end of it:

oracle soft nproc 2047 oracle hard nproc 16383 oracle soft nofile 1023 oracle hard nofile 65535
Using gedit open /etc/pam.d/login and add these lines to the end of it:
session required /lib/security/pam_limits.so session required pam_limits.so

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.

Your account has expired; please contact your system administrator su: User account has expired (Ignored)

Now you can set the display parameter to the correct ip so x windows sessions will be available.
Run in Terminal:

export DISPLAY=192.168.x.y:0.0

Step Eight

You are now going to run the installer. To do that you need to go to the database folder under your installation folder
Run in terminal:
cd database ls -l
You should get this response:
total 28 drwxr-xr-x 11 oracle dba 4096 2007-08-06 16:02 doc drwxr-xr-x 5 oracle dba 4096 2007-08-03 13:28 install drwxr-xr-x 2 oracle dba 4096 2007-09-18 18:52 response -rwxr-xr-x 1 oracle dba 2911 2007-08-03 13:28 runInstaller drwxr-xr-x 14 oracle dba 4096 2007-08-03 13:27 stage -rw-r--r-- 1 oracle dba 4835 2007-08-06 18:19 welcome.html

Now Start the installer.
Run in Terminal:

/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 terminal
xhost +
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

You might find how to install Ubuntu article also helpful if you have not installed Ubuntu yet.

Comments

  1. AMER HABBEH says:

    Hi Sir

    Thanks Sir for this article, i have a question
    How we can install and Configures Developer 10g or 11i on Ubuntu 8.04 LTS Desktop Edition if we want to developing and designing programs .??

    Thanks a lot .

  2. I have not tried to get there but it isprobably the same requirements as the Oracle server needs.
    Have you given it a shot?

  3. perezpuentejuan says:

    Thanks it is perfect guie to my ubuntu10 and oracle 10.

Speak Your Mind

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.