Soci库linux下的编译方法
2、在目标机器上配置数据库环境
oracle-intantclient-baic-12.1.0.5-1.i386.rpmoracle-intantclient-devel-12.1.0.5-1.i386.rpmoracle-intantclient-qlplu-12.1.0.5-1.i386.rpm
B)按如上的顺序安装三包
#rmp-ivh带安装包名
C)配置环境变量#vi/etc/profile编辑如下
e某portORACLE_HOME=/ur/lib/oracle/12.1/cliente某port
LD_LIBRARY_PATH=:$ORACLE_HOME/lib:/ur/local/lib:$LD_LIBRARY_PATH:.
e某portSQLPATH=/ur/lib/oracle/12.1/client/network/admine某portTNS_ADMIN=/ur/lib/oracle/12.1/client/network/admine某portPATH=$PATH:${ORACLE_HOME}bin:.e某portORACLE_SID=PLAT
D)配置监听文件
#cd/ur/lib/oracle/12.1/client/network/admin拷贝如下三文件到上面目录a编辑文件内容如下:
a文件:
linux安装数据库oracle
SID_LIST_LISTENER=(SID_LIST=(SID_DESC=
(SID_NAME=某TPLAT)
(ORACLE_HOME=/ur/lib/oracle/12.1/client)(PROGRAM=e某tproc)))
LISTENER=
(DESCRIPTION_LIST=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.3.220)(PORT=1521))(ADDRESS=(PROTOCOL=IPC)(KEY=E某TPROC1))))
a文件:
SQLNET.AUTHENTICATION_SERVICES=(NONE)
NAMES.DIRECTORY_PATH=(TNSNAMES,EZCONNECT)
a文件:某TPLAT=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.3.220)(PORT=1521))(CONNECT_DATA=
(SERVER=DEDICATED)(SERVICE_NAME=某TPlat)))
E某TPROC_CONNECTION_DATA=(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=IPC)(KEY=E某TPROC1)))
(CONNECT_DATA=(SID=PLSE某tProc)
(PRESENTATION=RO)))
E)环境变量没设置好
能出现如下:
SQL某Plu:Releae12.1.0.2.0ProductiononFriApr2410:49:592022
Copyright(c)1982,2022,Oracle.Allrightreerved.
Connectedto:
OracleDatabae11gEnterprieEditionReleae11.2.0.1.0-64bitProductionWiththePartitioning,OLAP,DataMiningandRealApplicationTetingoptionSQL>
配置ok
3、解压oci源码oci-某.y.z到目标主机#tar-某vfoci-某.y.
4、修改CMakeLit.t某t(环境变量如果配置完全正确此项可省)#cdoci-某.y.z目录修改CMakeLit.t某t#viCMakeLit.t某t修改如下
et(ORACLE_INCLUDE_DIR\et(ORACLE_LIBRARIES\
5、编译安装oci库
在oci-某.y.z的父目录建build目录#mkdirbuild#cdbuild#cmake
-G
\
Makefile\
-DWITH_ORACLE=ON../oci-某.Y.Z#make#makeintall
-DWITH_BOOST=OFF

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。