目标:将oracle-client(v11)安装到rdquo;/opt/oracle/rdquo;下准备好如下三个安装包,放在某个目录下,如:/root/software/ora
目标:将Oracle-client(v11)安装到”/opt/oracle/”下
准备好如下三个安装包,放在某个目录下,,如:/root/software/oracle
[root@localhost oracle]# pwd
/root/software/oracle
[root@localhost oracle]# ls
oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm // 这个是SDK开发包
oracle-instantclient11.2-sqlplus-11.2.0.2.0.i386.rpm
[root@localhost oracle]#
创建目标文件夹(oracle将安装在/opt/下)
[root@localhost opt]# mkdir oracle
[root@localhost opt]# mkdir oracle/network oracle/sdk
[root@localhost opt]# mkdir oracle/network/admin
解压其中2个rpm包(basic, sqlplus)
[root@localhost ~]# cd /root/software/oracle
[root@localhost oracle]# pwd
/root/software/oracle
[root@localhost oracle]# ls
oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-sqlplus-11.2.0.2.0.i386.rpm
[root@localhost oracle]# rpm2cpio oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm | cpio -div
./usr/lib/oracle/11.2/client/bin/adrci
./usr/lib/oracle/11.2/client/bin/genezi
./usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1
./usr/lib/oracle/11.2/client/lib/libnnz11.so
./usr/lib/oracle/11.2/client/lib/libocci.so.11.1
./usr/lib/oracle/11.2/client/lib/libociei.so
./usr/lib/oracle/11.2/client/lib/libocijdbc11.so
./usr/lib/oracle/11.2/client/lib/ojdbc5.jar
./usr/lib/oracle/11.2/client/lib/ojdbc6.jar
./usr/lib/oracle/11.2/client/lib/xstreams.jar
336597 块
[root@localhost oracle]# rpm2cpio oracle-instantclient11.2-sqlplus-11.2.0.2.0.i386.rpm | cpio -div
./usr/bin/sqlplus
./usr/lib/oracle/11.2/client/bin/sqlplus
./usr/lib/oracle/11.2/client/lib/glogin.sql
./usr/lib/oracle/11.2/client/lib/libsqlplus.so
./usr/lib/oracle/11.2/client/lib/libsqlplusic.so
5321 块
[root@localhost oracle]# ls
oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-sqlplus-11.2.0.2.0.i386.rpm
usr
将解压出来的usr目录下的bin和lib移动到/opt/oracle/下,再删除usr目录:
[root@localhost oracle]# mv usr/lib/oracle/11.2/client/bin /opt/oracle/
[root@localhost oracle]# mv usr/lib/oracle/11.2/client/lib /opt/oracle/
[root@localhost oracle]# rm -rf usr
解压剩下的rpm包(devel)
[root@localhost oracle]# rpm2cpio oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm | cpio -div
./usr/include/oracle/11.2/client/ldap.h
./usr/include/oracle/11.2/client/nzerror.h
./usr/include/oracle/11.2/client/nzt.h
./usr/include/oracle/11.2/client/occi.h
./usr/include/oracle/11.2/client/occiAQ.h
./usr/include/oracle/11.2/client/occiCommon.h
./usr/include/oracle/11.2/client/occiControl.h
./usr/include/oracle/11.2/client/occiData.h
./usr/include/oracle/11.2/client/occiObjects.h
./usr/include/oracle/11.2/client/oci.h
./usr/include/oracle/11.2/client/oci1.h
./usr/include/oracle/11.2/client/oci8dp.h
./usr/include/oracle/11.2/client/ociap.h
./usr/include/oracle/11.2/client/ociapr.h
./usr/include/oracle/11.2/client/ocidef.h
./usr/include/oracle/11.2/client/ocidem.h
./usr/include/oracle/11.2/client/ocidfn.h
./usr/include/oracle/11.2/client/ociextp.h
./usr/include/oracle/11.2/client/ocikpr.h
./usr/include/oracle/11.2/client/ocixmldb.h
./usr/include/oracle/11.2/client/ocixstream.h
./usr/include/oracle/11.2/client/odci.h
./usr/include/oracle/11.2/client/oratypes.h
./usr/include/oracle/11.2/client/ori.h
./usr/include/oracle/11.2/client/orid.h
./usr/include/oracle/11.2/client/orl.h
./usr/include/oracle/11.2/client/oro.h
./usr/include/oracle/11.2/client/ort.h
./usr/include/oracle/11.2/client/xa.h
./usr/lib/oracle/11.2/client/lib/libclntsh.so
./usr/lib/oracle/11.2/client/lib/libocci.so
./usr/lib/oracle/11.2/client/lib/ottclasses.zip
./usr/share/oracle/11.2/client/cdemo81.c
./usr/share/oracle/11.2/client/demo.mk
./usr/share/oracle/11.2/client/occidemo.sql
./usr/share/oracle/11.2/client/occidemod.sql
./usr/share/oracle/11.2/client/occidml.cpp
./usr/share/oracle/11.2/client/occiobj.cpp
./usr/share/oracle/11.2/client/occiobj.typ
./usr/share/oracle/11.2/client/ott
3833 块
[root@localhost oracle]#
将上面解压后的usr目录下所有文件移动到/opt/oracel/sdk下,删除无用的目录usr
[root@localhost oracle]# mv usr/* /opt/oracle/sdk/
[root@localhost oracle]# rm -rf usr
至此,oracle11的客户端安装完成,接下来进行配置
本文原创发布php中文网,转载请注明出处,感谢您的尊重!