Oracle 10g R2 install on Debian Sarge

Installing Oracle 10g R2 on Debian Sarge, Sid local and/or remote

I simply wrote down step by step what I did. Starting point is Oracle 10g R2 and a HowTo written by Graham Williams.

I did and tested three different way of intalling. My first installtion was directly on the machine with a Debian SID and an installed grafical interface (Gnome) and everything worked fine. for the installation on Debian Sarge there are a couple of things which one needs to watch out for, I marked thos with “NOTE SARGE”. After having gone through all of that I also did the installation over a remote console, as most of us just might not be able to sit right in front of the server, everything you need to watch out for on that is marked with “REMOTE”.

Please enter any fixes, comments, etc. on this post in my blog. Thanks.

NOTE REMOTE:

For my remote installation I am siting on a Windows Laptop and have cygwin installed. We will need the XServer installed (install cygwin with the XPackages). Start the XConsole with startx. In the XShell type xhost + (means as much as the XServer is allowed to receive information from the outside). Now we need Export the XWindows from the remote server to our XWindow export DISPLAY=111.111.111.111:0.0 (replace the 111 with your own IP adress). We need this for the installer, as it will use XWindows to display the installation dialog and we need to see what it is telling us of course.

If you are not sure that this is going to work for you (e.g. you are not using cygwin or are simply not sure and want to see this in action) then you should test this with something small like tuxeyes aptitude install tuxeyes and then execute tuxeyes.

1. Are all your needed pakages installed?

aptitude install gcc make binutils libmotif3 lesstif2 rpm libaio

GENERAL NOTE:

The HowTo from David Graham calls for libmotif3 to be installed but I was not able to find a pakage by this name in the sarge or sid dist. I found libmotif but the installer seems to run just fine without it. I still need to check further into this pakage as I am not sure what David was using or needing it for.

NOTE SARGE:

With SID you won’t have any more problems, with Debian Sarge you still need a pakage called libaio. So I simply loaded it straight from SID. Nothing fancy, I just changed /etc/sourceslist updated aptitude, installed the pagage and changed my sourceslist back to SARGE.

2. As the Oracle Installer was made and certified for Red Hat we need to do a couple of things so that it will let us install even though we are not on a Red Hat System:

ln -s /usr/bin/awk /bin/awk

ln -s /usr/bin/rpm /bin/rpm

ln -s /usr/bin/basename /bin/basename

ln -s /etc /etc/rc.d

3. So, lets get a copy of Oracle. Download on the oracle website http://otn.oracle.com/software/products/database/oracle10g/index.html and upload the pakage to the system where it needs to be installed, I use FileZilla which works pretty good over SSH.

4. Now unzip it. Makes no real difference where you unzip it to as these are only TEMP Files needed to install. Make sure you have enough space.

GENERAL NOTE:

For the zip file I use aptitude install unzip but do as you please.

5. Now we should have a directory called database (or Disk1 or whatever), everything should be inside. Leave it there for now.

6. Lets do a bit of fixing the Red Hat or pretending to be Red Hat

You can either change Disk1/install/oraparam.ini (Disk1 or whatever it is called on your system). Here you need to find Linux=redhat-2.1,UnitedLinux-1.0,redhat-3 and make it into Linux= or you can later use a specific setting when calling the installer:

./runInstaller -ignoreSysPrereqs

GENERAL NOTE:

There is a difference between fixing the file and using the setting mentioned above. My suggestion is fixing the File, as the installer does behave different. The “ignoreSysPrereqs” seems to separate the install steps in more parts which didn’t quite work for me (maybe it does for you). In theory the END result should be the same, well it wasn’t for me, so be warned.

7. Now we need a few groups and users, so let’s check if the already exist as the first step:

grep oinstall /etc/group

grep dba /etc/group

grep nobody /etc/group

id oracle

id nobody

8. Now creat the ones you still need:

GENERAL NOTE:

Should you not have a /home/oracle now wold be a good point in time to create that.

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

/usr/sbin/groupadd nobody

/usr/sbin/useradd -g oinstall -G dba -p passwd -d /home/oracle oracle

/usr/sbin/useradd -g nobody nobody

9. A couple more directories and permissions please

mkdir -p /u01/app/oracle

mkdir -p /u02/oradata

chown -R oracle:oinstall /u01 /u02

chmod -R 775 /u01 /u02

and who still doesn’t have one:

mkdir -p /home/oracle

chown -R oracle:oinstall /home/oracle

chmod -R 775 /home/oracle

GENERAL NOTE:

I created my /home/oracle right from the beginning and also copied my TEMP files into it, but as mentioned above, shouldn’t be a problem if you have them elsewhere. Do make sure though that the user oracle does also have rights on all the installation files.

10. Lets check your Kernel

/sbin/sysctl -a | grep sem

/sbin/sysctl -a | grep shm

/sbin/sysctl -a | grep file-max

/sbin/sysctl -a | grep ip_local_port_range

You should have the following:

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

If this is not the case, change it! Edit /etc/sysctl.conf with the following data:

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Relaod the conf /sbin/sysctl -p

11. Change a few security settings:

Edit /etc/security/limits.conf by adding the following lines:

* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

Edit /etc/pam.d/login and /etc/pam.d/su by activating or adding the following:

session required /lib/security/pam_limits.so

12. Edit your profile /etc/profile by adding:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Add umask 022 at the end of the file, but that is most likely already there.

13. Let’s go! At this exact point in time I suggest strongly not to get interrupted. Yes I mean it, unplug the phone, turn off your ICQ and lock the door.

su oracle

14. Change and set a few varibales:

ORACLE_BASE=/u01/app/oracle

ORACLE_SID=test

export ORACLE_BASE ORACLE_SID

unset ORACLE_HOME

unset TNS_ADMIN

ORATAB=/etc/oratab

15. Go to the installer

cd /tmp/Disk1_ (or wherever you put it)

./runInstaller

If for some reason the installer is complaining that that you are not on a Red Hat System, you missed something at the beginning. Either go back and handle it or do the following:

./runInstaller -ignoreSysPrereqs

NOTE REMOTE:

If you are doing a remote installation and are getting messages like the following … has got another sort of problem:

...i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

Don’t panic! Your machine is just telling you that it would like to have few more XPackages then you have given it. You can fix this by installing one package after the other until you got the lib he is looking for (have fun) or install “konsole” which will pull all needed pakages with it’s install.

aptitude install konsole

Another error for the remote user could be that the XWindows are not being exported, so do that now!

export DISPLAY=123.123.123.123:0.0 (change the 123.123 to the IP of the machine you are sitting on)

16. The installer once it appears on your screen is self explaining, I am not going into deatails here, if you decided to install Oracle on Debian you should know what Oracle is about and this should not be your first contact. Don’t forget to execute the two mentioned scripts in the installer as ROOT.

Have fun, hope I could be of some assistance.

  • Slashdot
  • Technorati Favorites
  • Twitter
  • Yahoo Bookmarks
  • Blogger Post
  • Delicious
  • Mister-Wong
  • MySpace
  • Plaxo Pulse
  • Facebook
  • Share/Bookmark

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>