Linux下安装python cx_Oracle
2016-01-14 14:08
537 查看
1.下载oracleinstantclient-basichttp://download.oracle.com/otn/linux/instantclient/112020/instantclient-basic-linux-x86-64-11.2.0.2.0.zip 2.安装配置oracleinstantclient
unzipinstantclient-basic-linux-x86-64-11.2.0.2.0.zipcp-rfinstantclient_11_2/opt/vi/root/.bash_profileexportORACLE_HOME=/opt/instantclient_11_2exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOMEsource/root/.bash_profile
如果机器上本来就有oracle,已经存在<spanstyle="font-family:Arial,Helvetica,sans-serif;">$ORACLE_HOME/instantclient </span>,那么只需要将<spanstyle="font-family:Arial,Helvetica,sans-serif;">instantclient_11_2中的内容,拷贝到现有的instantclient目录。</span>
<spanstyle="font-family:Arial,Helvetica,sans-serif;">但是要记得更新</span><spanstyle="font-family:Arial,Helvetica,sans-serif;">LD_LIBRARY_PATH</span>
==>比如:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/instantclient
<prename="code"class="html"><pstyle="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;font-family:Arial;line-height:26px;"><spanstyle="font-size:10px;">cd$ORACLE_HOME</span></p><pstyle="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-bottom:0px;font-family:Arial;line-height:26px;"><spanstyle="font-size:10px;">ln-slibclntsh.so.11.1libclntsh.so</span></p>3.downloadandinstallcx_Oracle-5.1.2.tar.gz
从<atarget=_blankhref="http://cx-oracle.sourceforge.net/"rel="nofollow"style="color:rgb(53,114,176);font-family:Arial,sans-serif;font-size:14px;line-height:20px;white-space:nowrap;">http://cx-oracle.sourceforge.net/</a>下载
tarxzvfcx_Oracle-5.1.2.tar.gz
pythonsetup.pybuild
pythonsetup.pyinstall
4.验证$python>>importcx_Oracle
相关文章推荐
- ORACLE 删除一个用户的所有表
- Oracle学习之Oracle 树操作(select…start with…connect by…prior)
- Oracle数据库易遗漏的知识点(一)
- MySQL的datetime日期格式化,和Oracle的datetime日期格式化
- Oracle sysdate 时间加减
- Oracle Connect By Prior用法
- cx_oracle设置问题汇总
- oracle 11g AMM与ASMM互相切换
- Oracle学习之start with...connect by子句的用法
- oracle的MAX_DUMP_FILE_SIZE参数和ora-02065
- oracle笔记整理10——性能调优之临时表与物化视图
- oracle笔记整理9——性能调优之索引、表分区、索引分区
- ORACLE 数据库函数使用
- Oracle连接数查看
- 关于oracle 跨用户访问表
- Oracle存储过程及调用
- java-spring的JdbcTempldate对oracle 的CLob字段进行读和写
- oracle rac 的优点和缺点
- oracle函数wm_concat行转列
- Oracle学习笔记:图形管理工具 EM 的使用