Cool Solution - Oracle Database Client on UCS4

From Univention Wiki

Jump to: navigation, search
Produktlogo UCS Version 4.0

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.

Download the software

For the download, you need an Oracle Account. You get the software from here.

In the line with "Linux x86-64", click on "See All" for additional download options. There you find the download parts for Oracle Database 12c Release 1 Client ( for Linux x86-64. Download and unzip them, in /opt for example. You should end up with a directory called "client".

Prepare UCS

Tuning kernel parameters

Edit /etc/sysctl.conf and add the following at the bottom:

kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmall = 2097152
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744

Now you can make those changes live:

sysctl -p

activate packages from unmaintained

ucr set repository/online/unmaintained='yes'

Package Requirements for x86_64

The following packages (or later versions) must be installed:


On a fresh UCS4 following packages are missing:

  • binutils
  • libc6-i386
  • libc6-dev-i386
  • libaio1
  • libaio-dev
  • libstdc++5
  • libstdc++6
  • libstdc++6-4.7-dev
  • libgcc1
  • make
  • sysstat
univention-install binutils libc6 libc6-i386 libc6-dev libc6-dev-i386 libaio1 libaio-dev libstdc++5 libstdc++6 libstdc++6-4.7-dev libgcc1 make sysstat

additional packages for ODC administrator tool

univention-install elfutils libelf-dev libelf1 expat

symlinks for the install script

Create symlinks so the installer can find a few utilities it needs:

ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename

Create an rc.d symlink:

ln -s /etc /etc/rc.d

System Group and User

Create an account and group:

groupadd oinstall
groupadd oraInventory
useradd -m -g oinstall -G oraInventory -p univention -s /bin/bash -d /home/oracle oracle
passwd oracle   <-- change password!

Oracle Base Directory

Create the Oracle Base Directory, where the software will be stored:

mkdir /home/u01
ln -s /home/u01 /
chown -R oracle.oinstall /home/u01
chmod -R 775 /home/u01

Change ownership of the directory from where we will run the Oracle installer:

chown -R oracle.oinstall /opt/client

Configuring the oracle User's Environment

If you are not logged in as the oracle user, then switch user to oracle:

su - oracle

Open the oracle user's shell startup file in any text editor:

vi ~/.profile

Enter or edit the following line, specifying a value of 022 for the default file mode creation mask:

umask 022

Setting up X and vnc to run the Oracle installer

Now we need to set up a minimal X environment (if it's not installed, which is default) in order to run the Oracle installer. Install the following packages, which include a dummy X server, xterm and a minimal window manager:

univention-install xserver-xorg-video-dummy vnc4server x11-xserver-utils xterm wm2

Allow access to vnc ports

To allow the vnc ports in the iptables firewall you can deactivate the firewall temporary (only during installation) or allow the necessary ports. To deactivate the firewall execute the following command:

ucr set security/packetfilter/disabled='true'
service univention-firewall restart

after installation enable the firewall with

ucr unset security/packetfilter/disabled
service univention-firewall restart

Running the Oracle installer

Now run vnc4server again as user oracle. Connect to this server from your own machine (vncviewer <hostname>:<vn port eg.: 1>) and run the Oracle installer within the terminal, which should be named runInstaller and can be found wherever you unzipped the Oracle11 zipfiles. The installation should be fairly self explanatory. The installer WILL complain about a few things not being the way it expects it to be. It will list them as fail. It is safe to ignore it and continue. Near the end the installer want you to execute a script as root. Do it and follow the on screen instructions to finish the installation.

Fix compilation-errors

While installing Oracle you sometimes may stumble upon compilation errors. Even though those are not fatal it may mean tools such as dbca are not available. To fix these you will need to do a little detective work. Check the make log file, it will tell you exactly what it is trying to find:

/u01/app/oracle/product/<version number>/<oracle product>/install/make.log

For example:

/usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a

Assuming you have the right packages installed this normally means such files are in a slightly different location. Try to find it:

find /usr/lib -name libpthread_nonshared.a

In case of a 64 bits system it could be in /usr/lib/x86_64-linux-gnu/, create a symlink this way:

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

In my case there were 2 erros and I fixed it with:

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

Cleanup X and vnc

Delete the Xserver and vnc4server packages:

apt-get remove xserver-xorg-video-dummy vnc4server x11-xserver-utils xterm wm2
apt-get autoremove

Further Steps

Installing Oracle Database Client Using Response Files

Provide a unattended installation with using response files

Oracle Database Client Postinstallation Tasks

See Postinstallation Tasks


Database Client Installation Guide

Download Oracle Software

Installing Oracle11 and Oracle12 on Debian Wheezy, Squeeze

unixODBC Project home page

Personal tools