Cool Solution - Oracle Database Client on UCS4

From Univention Wiki

Revision as of 12:41, 30 June 2015 by Birkefeld (talk | contribs) (fixed weblinks)
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.
Note: This article is not yet reviewed.

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_software".

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
apt-get 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

apt-get 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/database

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:

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

As user oracle run vnc4server, then kill it and edit


and add the following 2 lines to the bottom. This makes sure a window manager and terminal will be started without much problems:

x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
wm2 &

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


Database Client Installation Guide

Download Oracle Software

Installing Oracle11 and Oracle12 on Debian Wheezy, Squeeze

unixODBC Project home page

Personal tools