Difference between revisions of "Cool Solution - Oracle Database Client on UCS4"
From Univention Wiki
(first draft) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Cool Solutions Disclaimer|Repository=no| | + | {{Version|UCS=4.0}} |
− | {{ | + | {{Cool Solutions Disclaimer|Repository=no}} |
+ | {{#seo: | ||
+ | |title={{#replace:{{#replace:{{#replace:{{#replace:{{FULLPAGENAME}}|'|'}}|&|&}}|"|"}}|Cool Solution - |}} - {{SITENAME}} | ||
+ | <!--|description=--> | ||
+ | }} | ||
== Download the software == | == Download the software == | ||
− | For the download, you need an Oracle Account. You get the software from | + | For the download, you need an Oracle Account. You get the software from [http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html here]. |
− | + | ||
− | http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html | ||
− | |||
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 (12.1.0.2.0) for Linux x86-64. | 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 (12.1.0.2.0) for Linux x86-64. | ||
− | Download and unzip them, in /opt for example. You should end up with a directory called " | + | Download and unzip them, in /opt for example. You should end up with a directory called "<code>client</code>". |
== Prepare UCS == | == Prepare UCS == | ||
Line 14: | Line 16: | ||
=== Tuning kernel parameters === | === Tuning kernel parameters === | ||
Edit /etc/sysctl.conf and add the following at the bottom: | Edit /etc/sysctl.conf and add the following at the bottom: | ||
− | |||
<pre> | <pre> | ||
kernel.sem = 250 32000 100 128 | kernel.sem = 250 32000 100 128 | ||
Line 27: | Line 28: | ||
fs.file-max = 6815744 | fs.file-max = 6815744 | ||
</pre> | </pre> | ||
− | |||
Now you can make those changes live: | Now you can make those changes live: | ||
<pre> | <pre> | ||
Line 78: | Line 78: | ||
<pre> | <pre> | ||
− | + | 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 | |
</pre> | </pre> | ||
==== additional packages for ODC administrator tool ==== | ==== additional packages for ODC administrator tool ==== | ||
<pre> | <pre> | ||
− | + | univention-install elfutils libelf-dev libelf1 expat | |
</pre> | </pre> | ||
=== symlinks for the install script === | === symlinks for the install script === | ||
− | |||
Create symlinks so the installer can find a few utilities it needs: | Create symlinks so the installer can find a few utilities it needs: | ||
<pre> | <pre> | ||
Line 99: | Line 98: | ||
ln -s /etc /etc/rc.d | ln -s /etc /etc/rc.d | ||
</pre> | </pre> | ||
− | |||
=== System Group and User === | === System Group and User === | ||
Line 120: | Line 118: | ||
Change ownership of the directory from where we will run the Oracle installer: | Change ownership of the directory from where we will run the Oracle installer: | ||
<pre> | <pre> | ||
− | chown -R oracle.oinstall /opt/ | + | chown -R oracle.oinstall /opt/client |
</pre> | </pre> | ||
− | |||
=== Configuring the oracle User's Environment === | === Configuring the oracle User's Environment === | ||
− | |||
If you are not logged in as the oracle user, then switch user to oracle: | If you are not logged in as the oracle user, then switch user to oracle: | ||
− | <pre> | + | <pre>su - oracle</pre> |
Open the oracle user's shell startup file in any text editor: | Open the oracle user's shell startup file in any text editor: | ||
Line 138: | Line 134: | ||
=== Setting up X and vnc to run the Oracle installer === | === 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. | 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: | Install the following packages, which include a dummy X server, xterm and a minimal window manager: | ||
<pre> | <pre> | ||
− | + | univention-install xserver-xorg-video-dummy vnc4server x11-xserver-utils xterm wm2 | |
</pre> | </pre> | ||
− | + | === 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: | ||
+ | <pre> | ||
+ | ucr set security/packetfilter/disabled='true' | ||
+ | service univention-firewall restart | ||
+ | </pre> | ||
+ | after installation enable the firewall with | ||
<pre> | <pre> | ||
− | + | ucr unset security/packetfilter/disabled | |
− | + | service univention-firewall restart | |
</pre> | </pre> | ||
Line 169: | Line 170: | ||
find /usr/lib -name libpthread_nonshared.a | find /usr/lib -name libpthread_nonshared.a | ||
</pre> | </pre> | ||
+ | |||
In case of a 64 bits system it could be in /usr/lib/x86_64-linux-gnu/, create a symlink this way: | In case of a 64 bits system it could be in /usr/lib/x86_64-linux-gnu/, create a symlink this way: | ||
<pre> | <pre> | ||
Line 174: | Line 176: | ||
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a | ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a | ||
</pre> | </pre> | ||
+ | |||
+ | In my case there were 2 erros and I fixed it with: | ||
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
+ | |||
+ | == Cleanup X and vnc == | ||
+ | Delete the Xserver and vnc4server packages: | ||
+ | <pre> | ||
+ | apt-get remove xserver-xorg-video-dummy vnc4server x11-xserver-utils xterm wm2 | ||
+ | apt-get autoremove | ||
+ | </pre> | ||
+ | |||
+ | == Further Steps == | ||
+ | === Installing Oracle Database Client Using Response Files === | ||
+ | Provide a unattended installation with [http://docs.oracle.com/cd/E11882_01/install.112/e24322/app_nonint.htm#LACLI1352 using response files] | ||
+ | |||
+ | === Oracle Database Client Postinstallation Tasks === | ||
+ | See [http://docs.oracle.com/cd/E11882_01/install.112/e24322/post_inst_task.htm#LACLI1326 Postinstallation Tasks] | ||
== References == | == References == | ||
[http://docs.oracle.com/cd/E11882_01/install.112/e24322/toc.htm Database Client Installation Guide ] | [http://docs.oracle.com/cd/E11882_01/install.112/e24322/toc.htm Database Client Installation Guide ] | ||
+ | |||
+ | [http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html Download Oracle Software] | ||
[https://www.debian-administration.org/article/656/Installing_Oracle11_and_Oracle12_on_Debian_Wheezy_Squeeze Installing Oracle11 and Oracle12 on Debian Wheezy, Squeeze] | [https://www.debian-administration.org/article/656/Installing_Oracle11_and_Oracle12_on_Debian_Wheezy_Squeeze Installing Oracle11 and Oracle12 on Debian Wheezy, Squeeze] | ||
[http://www.unixodbc.org/ unixODBC Project home page] | [http://www.unixodbc.org/ unixODBC Project home page] |
Latest revision as of 14:03, 8 September 2017
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.
Contents
- 1 Download the software
- 2 Prepare UCS
- 2.1 Tuning kernel parameters
- 2.2 activate packages from unmaintained
- 2.3 Package Requirements for x86_64
- 2.4 symlinks for the install script
- 2.5 System Group and User
- 2.6 Oracle Base Directory
- 2.7 Configuring the oracle User's Environment
- 2.8 Setting up X and vnc to run the Oracle installer
- 2.9 Allow access to vnc ports
- 3 Running the Oracle installer
- 4 Cleanup X and vnc
- 5 Further Steps
- 6 References
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 (12.1.0.2.0) 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:
binutils-2.19 gcc-4.3 gcc-c++-4.3 glibc-2.9 glibc-32bit-2.9 glibc-devel-2.9 glibc-devel-32bit-2.9 libaio-0.3.104 libaio-32bit-0.3.104 libaio-devel-0.3.104 libaio-devel-32bit-0.3.104 libstdc++33-3.3.3 libstdc++33-32bit-3.3.3 libstdc++43-4.3.3_20081022 libstdc++43-32bit-4.3.3_20081022 libstdc++43-devel-4.3.3_20081022 libstdc++43-devel-32bit-4.3.3_20081022 libgcc43-4.3.3_20081022 libstdc++-devel-4.3 make-3.81 sysstat-8.1.5
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
References
Database Client Installation Guide