Saturday, October 21

Oracle 10gR2 on Ubuntu 6.10 AMD64

I just finished installing Oracle 10gR2 on my Intel Core2 Ubuntu 6.10 machine running in x86_64 (AMD64) mode. The installation is fairly straight forward with a few gotchas. In comparison to CentOS/Redhat, Ubuntu 6.10 has got much more native 64-bit libraries, pretty much everything is actually 64-bit. Under Redhat most libraries are 32-bit. And the Oracle Universal Installer (OUI) uses a 32-bit Java runtime so hence we have to install a few i386 compatability libraries to get it working.

First of all make sure your machines hostname resolves to your external IP and not the loopback IP (127.0.0.1).
Double check using this command
$ grep $(hostname) /etc/hosts
192.168.95.40 htpc
If you see 127.0.0.1 just edit the hosts file to have the external IP.

Now you need to install a few compat libraries and 32-bit libraries.
sudo apt-get install gcc libaio1 lesstif2 
lesstif2-dev make libc6 libstdc++5 \
lib32stdc++6 lib32z1 ia32-libs
This will probably cascade in to quite a few packages depending on how much you have installed, be patient and let it download everything it needs. The extra ia32 libraries is probably the biggest change to the old 32-bit installation.

Edit /etc/sysctl.conf to have the kernel parameters required by Oracle (I've added a few extras here as well to avoid unecessery swapping).
Add these lines:
# Oracle stuff
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
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vm.swappiness=10
Create the oracle user and required groups (you don't really need the nobody group, it's only used by root.sh to be the group owning the oraenv and dbhome scripts).
sudo groupadd nobody
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -s /bin/bash -g oinstall -G dba oracle
sudo passwd oracle

Increase system limits by adding these lines to /etc/security/limits.conf:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
To avoid the non-redhat warnings during the prereqs run this command:
echo 3 > /etc/redhat-release
Add a few symlinks to avoid any script problems:
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /bin/true /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
sudo mkdir -p /u01/oracle/10g
sudo chown -R oracle:oinstall /u01/oracle/10g
sudo chmod -R 775 /u01/oracle
Time to run the installer, make sure you are allowed to use the X11 server (export DISPLAY, xhost, vnc whatever).
To get the 32-bit JRE to work you need to set the XLOCALELIBDIR before running the installer:
export XLOCALELIBDIR=/usr/lib32/X11/locale
cd /your/install/dir
./runInstaller
I just ran the defaults straight through (except the SID name and password). The installation without any warnings or errors. The linker worked fine and everything was configure properly, dbca created the standard database.
oracle@htpc:~$ uname -a
Linux htpc 2.6.17-10-generic #2 SMP Fri Oct 13 15:34:39 UTC 2006 x86_64 GNU/Linux
oracle@htpc:~$ rsqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 21 20:13:45 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select platform_name from v$database;

PLATFORM_NAME
--------------------
Linux 64-bit for AMD

SQL>

This guide is based on the Oracle 10gR2 x64_64 installation guide and I've also used Dizwells excellent Ubuntu 6.06 32-bit guide for some ubuntu specific notes. Thanks.

Cool, now I can alt-tab between sqlplus and my latest Prison Break episodes on the TV . :)

11 comments:

DanceWeekend said...

Wow, this almost worked for me! But I ran into a linking problem that I couldn't figure out. After several hours of attempting a full install, I tried installing just the client and runtime files which worked for me. So far DBD-Oracle works and I'm about to try compiling Tora. If those two things work, then I'm golden. Thanks a ton!

Anonymous said...

i am installing 10g in ubuntu now and the prechecks stop at 88% in system requierments (isqlplus).i dont know what is the problem?

Cody Casterline said...

on the line:
sudo useradd -s /bin/bash -g oinstall -G dba

you probably meant:
sudo useradd -s /bin/bash -g oinstall -G dba oracle

Anonymous said...

You can allways run the installer with -IgnoreSysPrereqs instead of 'impersonating' Red Hat.

That's what I did here:

http://carlosal.wordpress.com/2007/01/04/oracle10gr2-en-ubuntu-610-edgy-eft/

and here:

http://carlosal.wordpress.com/2007/03/04/actualizando-a-oracle-10203-en-ubuntu/

Cheers.

Carlos.

Hampus said...

I would not recommend using -ignoreSysPrereqs.
The pre req checks are good to have, just to make sure one has configured the rest of the settings correctly.

Richard Zimmerman said...

Linking problems seem to be remedied by:
apt-get install libc6-dev-i386

----
You can reach me at:
Voter Genome Project
Intelligent Integration Systems

Austin Home Buyer said...
This comment has been removed by the author.
Austin Home Buyer said...

I got this when I tried to install dev-i386 on Gutsy Gibbon

# apt-get install libc6-dev-i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against that package should be filed.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-dev-i386: Depends: libc6-i386 (=2.5-0ubuntu14) but 2.6.1-1ubuntu10 is to be installed

Depends: libc6-dev (= 2.5-0ubuntu14) but it is not going to be installed

# apt-get install libc6-dev-i386=2.5-0ubuntu14
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation:

The following packages have unmet dependencies:

libc6-dev-i386: Depends: libc6-i386 (=2.5-0ubuntu14) but 2.6.1-1ubuntu10 is to be installed

Depends: libc6-dev (= 2.5-0ubuntu14) but it is not going to be installed

Anonymous said...

thanks a lot for your tutorial... helped me a lot!

Unknown said...

导热油炉吴桥县导热油炉锅有限责任公司是全国最大的生产导热油炉生产基地之一,公司主要生产各种导热油炉锅,熔盐炉, 转盘轴承,管式加热炉,蒸汽发生器,一二类压力容器.徐州回转支承 公司提供转盘轴承 --slewing ring slewing bearing slewing bearings服务. automation-industrial-industrial automation-slewing bearingslewing bearings
铁路
轨道交通
太阳能
ren

Anonymous said...

Hey thanks I already use it and it is spectacular good and useful
India Pharmacy