Install Oracle client 10.2 in Solaris 10 on SPARC platform
1. Get Oracle client 10.2 from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/solsoft.html, e.g.: instantclient-basic-solaris6432- 10.2.0 .3-20070101.zip
2. Unzip at windows platform
3. Upload the directory to Unix server
4. Copy the directory to the single path(e.g.:/usr/ instantclient_10_2)
5. Set the library loading path in the environment to the directory (e.g.:/usr/ instantclient_10_2), usually the LD_LIBRARY_PATH is the appropriate environment variable. (Append the path to .login file)
6. Copy the sdk files of Oracle to /usr/ instantclient_10_2/sdk
*The .login example file:
#/bin/csh
#
# C-shell .login file for operator template account. This login
# file is the hook that starts the keyboard-based operator interface
# menu as opposed to standard Image.
#
# Revisions:
# 9 Mar 95: R. Lindberg - [5.7] start menuprogram.svr4 instead of menuprogram
# is using SVR4
# 23 Aug 91: G. Brizicky - [4.1] Remove specific reference to Image 4.0
# 9-Apr-90: created
#
#------------------------------------------------------------------
#
# Get System Configuration file
#
#tconfig > confsim.txt
#
# Source the Image .login file
#
set path=($path $HOME /usr/sbin /usr/local/bin /image/custom /image/bin.rls /usr/instantclient_10_2)
#
################################################################
################## library for perl ############################
################################################################
setenv LD_LIBRARY_PATH "/usr/local/lib:/usr/openwin/lib"
#setenv LD_LIBRARY_PATH "$IMAGEBIN/lib:/usr/local/lib:/usr/openwin/lib"
################################################################
if ("`tty`" == "/dev/console") then
# netscape &
endif
#if ($?LD_LIBRARY_PATH == 0) then
# setenv LD_LIBRARY_PATH /usr/openwin/lib else
# setenv LD_LIBRARY_PATH /usr/openwin/lib:${LD_LIBRARY_PATH}
#endif
setenv LD_LIBRARY_PATH "/usr/local/lib:/usr/openwin/lib:/image/bin.rls/lib:/usr/instantclient_10_2"
setenv ORACLE_HOME /usr/instantclient_10_2
setenv TNS_ADMIN /usr/instantclient_10_2
setenv SQLPATH /usr/instantclient_10_2
*The .cshrc example file:
setenv LD_LIBRARY_PATH "/usr/local/lib:/usr/openwin/lib:/image/bin.rls/lib:/usr/instantclient_10_2"
setenv ORACLE_HOME /usr/instantclient_10_2
setenv TNS_ADMIN /usr/instantclient_10_2
setenv SQLPATH /usr/instantclient_10_2
setenv PATH "/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/image/custom:/image/bin.rls:/usr/instantclient_10_2"
Install Perl DBI and DBD(Need root account)
1. Install DBI
(1). Get the package from www.cpan.org (e.g.: DBI-1.602.tar)
(2). Uncompress DBI-1.602.tar to DBI-1.602
(3). Use these commands:
- # csh
- # cd DBI-1.602
- # perl Makefile.PL
- # /usr/ccs/bin/make
- # /usr/ccs/bin/make test
- # /usr/ccs/bin/make install
*If cause error when run /usr/ccs/bin/make command as:
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
*We should do like this:
- # csh (goto csh mode)
- # setenv cc gcc(If has installed gcc)
- open Makefile, and find the following line:
CCCDLFLAGS = -KPIC
- change this to:
CCCDLFLAGS =
- then, find the line:
OPTIMIZE = -xO3 -xspace -xildoff
- change this to:
OPTIMIZE =
- then, find the line:
CCFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO
- change this to:
CCFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO
- then try /usr/ccs/bin/make, /usr/ccs/bin/make test, /usr/ccs/bin/make install again
2. Install DBD
(1). Get the package from www.cpan.org (e.g.: DBD-Oracle-1.19.tar)
(2). Uncompress DBD-Oracle-1.19.tar to DBD-Oracle-1.19
(3). Use these commands:
- # csh
- # cd DBD-Oracle-1.19
- # setenv LD_LIBRARY_PATH /usr/instantclient_10_2
- # perl Makefile.PL
- # /usr/ccs/bin/make
- # /usr/ccs/bin/make test
- # /usr/ccs/bin/make install
* If error occurs when run “perl Makefile.PL”, edit Makefile.PL:
# my @h_dirs = find_headers(); (Comment)
if ($client_version_full =~ /^ 8.0.6 / && $os eq 'hpux') {
$linkwith_msg = "-lextp -l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
# push @h_dirs, "$OH/network/public"; (Comment)
}
else {
$linkwith_msg = "-l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
}
# my $inc = join " ", map { "-I$_" } @h_dirs; (Comment)
my $inc = "-I/usr/instantclient_10_2/sdk/include";(Append, the oracle sdk “*.h” files directory)
……
……
#my @h_dirs = find_headers();(Comment)
#my $inc = join " ", map { "-I$_" } @h_dirs; (Comment)
my $inc = "-I/usr/instantclient_10_2/sdk/include";(Append, the oracle sdk “*.h” files directory)
* If error occurs when run “/usr/ccs/bin/make”:
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
do like install DBI.