Friday, February 24, 2012

Oracle 11gR2 + Ubuntu 11.10

First prereqs:

sudo apt-get install build-essential libaio1 libaio-dev lesstif2 lesstif2-dev libc6-i386 libc6-dev-i386 gawk ksh libmotif3 alien libtool lsb-rpm lib32stdc++6 lib32z1 ia32-libs sysstat rlwrap unixodbc unixodbc-dev elfutils rpm x11-utils ksh libxp6

wget http://ftp3.nrc.ca/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_amd64.deb
dpkg -i libstdc++5_3.3.6-18_amd64.deb

Into /etc/sysctl.conf:
fs.file-max = 6815744
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 = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

Into /etc/security/limits.conf
oracle soft nproc 2048
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

and the other usual stuff.

When you get the nnfyboot error:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
ln -­s /usr/bin/basename /bin/basename
ln ­-s $ORACLE_HOME/lib/libclient10.a $ORACLE_HOME/lib/libagtsh.a
$ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0

(Edit for 11.2.0.3)

mkdir /usr/lib64
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64

Also see here for the following instructions:

During relinking operation OUI will fail and in $ORACLE_HOME/install/make.log  you will find following error.
/u01/app/dev/Middleware/agent11g/lib/libnnz11.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [/u01/app/dev/Middleware/agent11g/sysman/lib/emdctl] Error 1
make[1]: Leaving directory `/u01/app/dev/Middleware/agent11g/sysman/lib'
Solution:
======
When you start to install with ./runInstaller, run in another terminal window (as root)
ls $ORACLE_HOME/sysman/lib/ins_emagent.mk
At first this will produce an error, as the installer wont have created this file yet.
Once the file exists, do:
vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
Search for the line
$(MK_EMAGENT_NMECTL)
Change it to:
$(MK_EMAGENT_NMECTL) -lnnz11

What's more, insanely for some reason we could link Oracle libraries with the GCC 4.6 on 10.2.0.2 but not on 10.2.0.3. gcc is a symlink to /usr/bin/gcc4.6 by default.

apt-get install gcc-4.4
cd /usr/bin
rm gcc
ln -s gcc-4.4 gcc
once it's all linked w/o errors
rm gcc
ln -s gcc-4.6 gcc

and then retry and retry and retry. Insane!

Until Ubuntu gets Oracle certified, it's server won't be taken seriously. On the other hand, Oracle hasn't certified OEL6 with Oracle 11gR2 so I'm not taking Oracle seriously either.

No comments: