12gR1 client auf Debian Jessie (GSI) 64bit

21.07.2015

HartmutWeierstall hat das ZIP-Archive, welches den Install Type Administrator unterstuetzt, zur Verfuegung gestellt. Dieses wurde von BastianNeuburger auf lxbuild05 geschoben und wie folgt zu einer funktionierenden Installation transformiert:

Vorbereitungen

Neben den schon installierten Paketen musste noch DebPkg:libaio-dev installiert werden. Zudem stellt sich im Verlauf der Installation heraus, dass der Installer bestimmte Libraries in /usr/lib64 sucht, statt in /usr/lib/x86_64-linux-gnu, um dieses Problem zu umgehen reicht es, temporaer einen Link anzulegen: sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

Ausserdem will der Installer eine Datei /etc/oraInst.loc, in die folgendes rein muss:
inventory_loc=/home/bneuburg/oraInventory # ggf. durch installierenden User ersetzen
inst_group=it

Zum Entpacken des Oracle-Installers einfach unzip linuxamd64_12102_client.zip ausfuehren, anschliessend hat man das Verzeichnis client.

Standardmaessig ist der Oracle-Installer eine GUI Applikation, allerdings gibt es die Moeglichkeit, eine sogenannte Response File anzulegen und dem Installer mitzuteilen um eine nicht-interaktive Installation rein auf der Konsole durchzufuehren.

Diese liegt in /home/bneuburg/client_install.rsp und das Template hierzu kam aus client/response/client_install.rsp. Die angepasste Response File sieht so aus:
###############################################################################
## Copyright(c) Oracle Corporation 1998,2014. All rights reserved.           ##
##                                                                           ##
## Specify values for the variables listed below to customize                ##
## your installation.                                                        ##
##                                                                           ##
## Each variable is associated with a comment. The comment                   ##
## can help to populate the variables with the appropriate                   ##
## values.							             ##
##                                                                           ##
###############################################################################


#-------------------------------------------------------------------------------
# Do not change the following system generated value. 
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v12.1.0

#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user. 
# It can be used to force the installation to use an alternative   
# hostname rather than using the first hostname found on the system
# (e.g., for systems with multiple hostnames and network interfaces).
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=lxbuild05.gsi.de

#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
#------------------------------------------------------------------------------- 
UNIX_GROUP_NAME=it
#-------------------------------------------------------------------------------
# Inventory location.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/home/bneuburg/oraInventory
#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.             
#
# en   : English                  ja   : Japanese                  
# fr   : French                   ko   : Korean                    
# ar   : Arabic                   es   : Latin American Spanish    
# bn   : Bengali                  lv   : Latvian                   
# pt_BR: Brazilian Portuguese     lt   : Lithuanian                
# bg   : Bulgarian                ms   : Malay                     
# fr_CA: Canadian French          es_MX: Mexican Spanish           
# ca   : Catalan                  no   : Norwegian                 
# hr   : Croatian                 pl   : Polish                    
# cs   : Czech                    pt   : Portuguese                
# da   : Danish                   ro   : Romanian                  
# nl   : Dutch                    ru   : Russian                   
# ar_EG: Egyptian                 zh_CN: Simplified Chinese        
# en_GB: English (Great Britain)  sk   : Slovak                    
# et   : Estonian                 sl   : Slovenian                 
# fi   : Finnish                  es_ES: Spanish                   
# de   : German                   sv   : Swedish                   
# el   : Greek                    th   : Thai                      
# iw   : Hebrew                   zh_TW: Traditional Chinese       
# hu   : Hungarian                tr   : Turkish                   
# is   : Icelandic                uk   : Ukrainian                 
# in   : Indonesian               vi   : Vietnamese                
# it   : Italian                                                   
#
# all_langs   : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,de

#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
#-------------------------------------------------------------------------------  
ORACLE_HOME=/cvmfs/it.gsi.de/oracle/product/12.1.2/client_x86_64_1

#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=/cvmfs/it.gsi.de/oracle

#------------------------------------------------------------------------------
#Name       : INSTALL_TYPE
#Datatype   : String
#Description: Installation type of the component.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#               - InstantClient
#               - Administrator
#               - Runtime
#               - Custom
#
#Example    : INSTALL_TYPE = Administrator
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator

#-------------------------------------------------------------------------------
# Name       : oracle.install.client.customComponents
# Datatype   : StringList
#
# This property is considered only if INSTALL_TYPE is set to "Custom"
#
# Description: List of Client Components you would like to install
#
#   The following choices are available. You may specify any
#   combination of these choices.  The components you choose should
#   be specified in the form "internal-component-name:version"
#   Below is a list of components you may specify to install.
#
# oracle.sqlj:12.1.0.2.0 -- "Oracle SQLJ"
# oracle.rdbms.util:12.1.0.2.0 -- "Oracle Database Utilities"
# oracle.javavm.client:12.1.0.2.0 -- "Oracle Java Client"
# oracle.sqlplus:12.1.0.2.0 -- "SQL*Plus"
# oracle.dbjava.jdbc:12.1.0.2.0 -- "Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:12.1.0.2.0 -- "Oracle Internet Directory Client"
# oracle.rdbms.oci:12.1.0.2.0 -- "Oracle Call Interface (OCI)"
# oracle.precomp:12.1.0.2.0 -- "Oracle Programmer"
# oracle.xdk:12.1.0.2.0 -- "Oracle XML Development Kit"
# oracle.network.aso:12.1.0.2.0 -- "Oracle Advanced Security"
# oracle.oraolap.mgmt:12.1.0.2.0 -- "OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:12.1.0.2.0 -- "Oracle Net"
# oracle.network.cman:12.1.0.2.0 -- "Oracle Connection Manager"
# oracle.network.listener:12.1.0.2.0 -- "Oracle Net Listener"
# oracle.ordim.client:12.1.0.2.0 -- "Oracle Multimedia Client Option"
# oracle.odbc:12.1.0.2.0 -- "Oracle ODBC Driver"
# oracle.has.client:12.1.0.2.0 -- "Oracle Clusterware High Availability API"
# oracle.dbdev:12.1.0.2.0 -- "Oracle SQL Developer"
# oracle.rdbms.scheduler:12.1.0.2.0 -- "Oracle Scheduler Agent" 
#
# Example    : oracle.install.client.customComponents="oracle.precomp:12.1.0.2.0","oracle.oraolap.mgmt:12.1.0.2.0","oracle.rdbms.scheduler:12.1.0.2.0"
#-------------------------------------------------------------------------------
oracle.install.client.customComponents=

#-------------------------------------------------------------------------------
# Host name to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example    : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=

#------------------------------------------------------------------------------
# Port number to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example: oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentPortNumber=

Wichtig ist u.a. der Installationstyp, in diesem Fall Administrator.

Installation

Nach den Vorbereitungen ruft man den Installer, der im client Verzeichnis liegt auf: ./client/runInstaller -silent -responseFile /home/bneuburg/client_install.rsp. Hierbei ist es wichtig, die Response File mit absolutem Pfad anzugeben. Das ganze dauert dann ca. 5 Minuten, das Warning [WARNING] [INS-13001] Environment does not meet minimum requirements. kann ignoriert werden, leider ist Debian keine offiziell von Oracle unterstuetzte Plattform, die fertige Software findet man nun unter /cvmfs/it.gsi.de/oracle.

Nach Abschluss der Installation muessen noch einige Permissions geradegezogen werden: find /cvmfs/it.gsi.de/oracle/product/12.1.2/client_x86_64_1/bin/ -perm 751 -exec chmod a+r {}\;

Zudem muessen in /cvmfs/it.gsi.de/oracle/product/12.1.2/client_x86_64_1/network/admin die sqlnet.ora und ldap.ora noch analog zu den Squeeze und Wheezy Installationen angepasst werden, damit Datenbanknamen wie db richtig aufgeloest werden.

Last but not least muss noch eine oraenv in /cvmfs/it.gsi.de/oracle angelegt werden:

#!/bin/sh
#
# $Header: /var/lib/foswiki/data/Oracle/LinuxClients.txt,v 1.20 2015/07/21 12:01:50 BastianNeuburger Exp $ oraenv.sh.pp Copyr (c) 1991 Oracle
# 
# Copyright (c) 1991, 2008, Oracle and/or its affiliates.All rights reserved. 
#
# This routine is used to condition a Bourne shell user's environment
# for access to an ORACLE database.  It should be installed in
# the system local bin directory.
#
# The user will be prompted for the database SID, unless the variable
# ORAENV_ASK is set to NO, in which case the current value of ORACLE_SID
# is used.
# An asterisk '*' can be used to refer to the NULL SID.
#
# 'dbhome' is called to locate ORACLE_HOME for the SID.  If
# ORACLE_HOME cannot be located, the user will be prompted for it also.
# The following environment variables are set:
#
#       ORACLE_SID      Oracle system identifier
#       ORACLE_HOME     Top level directory of the Oracle system hierarchy
#       PATH            Old ORACLE_HOME/bin removed, new one added
#       ORACLE_BASE     Top level directory for storing data files and 
#                       diagnostic information.
#
# usage: . oraenv
#
# NOTE:		Due to constraints of the shell in regard to environment
# -----		variables, the command MUST be prefaced with ".". If it
#		is not, then no permanent change in the user's environment
#		can take place.
#
# M.D.  5/12/2011 angepasst fuer cvmfs SW Verteilung auf Squeeze
# B.N. 21/07/2015 Update auf Jessie, Parse Error fuer zsh geloest
#####################################

case ${ORACLE_TRACE:-""} in

"T")  set -x ;;
esac

#
# Determine how to suppress newline with echo command.
#
N=
C=
if echo "\c" | grep c >/dev/null 2>&1; then
N='-n'
else
C='\c'
fi

#
# Set minimum environment variables
#

# ensure that OLDHOME is non-null
if [ ${ORACLE_HOME:-0} = 0 ]; then
OLDHOME=$PATH
else
OLDHOME=$ORACLE_HOME
fi

ORACLE_HOME=/cvmfs/it.gsi.de/oracle/product/12.1.2/client_x86_64_1


export ORACLE_HOME 

#
# Reset LD_LIBRARY_PATH
#
case ${LD_LIBRARY_PATH:-""} in
*$OLDHOME/lib*)     LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | \
sed "s;$OLDHOME/lib;$ORACLE_HOME/lib;g"` ;;
*$ORACLE_HOME/lib*) ;;
"")                 LD_LIBRARY_PATH=$ORACLE_HOME/lib ;;
*)                  LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH ;;
esac

export LD_LIBRARY_PATH

#
# Put new ORACLE_HOME in path and remove old one
#

case "$OLDHOME" in
"")	OLDHOME=$PATH ;;	#This makes it so that null OLDHOME can't match
esac				#anything in next case statement

case "$PATH" in
*$OLDHOME/bin*)	PATH=`echo $PATH | \
sed "s;$OLDHOME/bin;$ORACLE_HOME/bin;g"` ;;
*$ORACLE_HOME/bin*)	;;
*:)			PATH=${PATH}$ORACLE_HOME/bin: ;;
"")			PATH=$ORACLE_HOME/bin ;;
*)			PATH=$PATH:$ORACLE_HOME/bin ;;
esac

export PATH 

# Locate "osh" and exec it if found
ULIMIT=`LANG=C ulimit 2>/dev/null`

if [ $? = 0 -a "$ULIMIT" != "unlimited" ] ; then
if [ "$ULIMIT" -lt 2113674 ] ; then

if [ -f $ORACLE_HOME/bin/osh ] ; then
exec $ORACLE_HOME/bin/osh
else
for D in `echo $PATH | tr : " "`
do
if [ -f $D/osh ] ; then
exec $D/osh
fi
done
fi

fi

fi

# Set the value of ORACLE_BASE in the environment.  Use the orabase
# executable from the corresponding ORACLE_HOME, since the ORACLE_BASE
# of different ORACLE_HOMEs can be different.

# The return value of orabase will be determined based on the following :
#
#  1.  Value of ORACLE_BASE in the environment.
#  2.  Get the value of ORACLE_BASE from oraclehomeproperties.xml as 
#      set in the ORACLE_HOME inventory.

ORACLE_BASE=/cvmfs/it.gsi.de/oracle
export ORACLE_BASE

if [ ${ORACLE_BASE:-"x"} != "x" ]; then
echo "The Oracle base for ORACLE_HOME=$ORACLE_HOME is $ORACLE_BASE"
else
if [ -w $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml ]; then
if [ -e $ORABASE_EXEC ] ; then
if [ -x $ORABASE_EXEC ]; then
ORACLE_BASE=`$ORABASE_EXEC`
export ORACLE_BASE
echo "The Oracle base for ORACLE_HOME=$ORACLE_HOME is $ORACLE_BASE"
else
echo "The $ORACLE_HOME/bin/orabase binary does not have execute privilege"
echo "for the current user, $USER.  Rerun the script after changing"
echo "the permission of the mentioned executable."
fi
else
ORACLE_BASE=$ORACLE_HOME
export ORACLE_BASE
echo "The Oracle base for ORACLE_HOME=$ORACLE_HOME is $ORACLE_BASE"
fi
else
echo "ORACLE_BASE environment variable is not being set since this"
echo "information is not available for the current user ID $USER."
echo "You can set ORACLE_BASE manually if it is required."
fi
fi

#
# Install any "custom" code here
#
echo "Oracle 12g (12.1.2) client environment setup for Linux Debian Jessie 64 Bit finished"

Hier spielt vor allem das Setzen der Umgebungsvariable ORACLE_HOME eine Rolle.

-- BastianNeuburger - 10 Jun 2016
Topic revision: r2 - 2016-06-10, BastianNeuburger
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)