Red Hat安装cx_Oracle

环境:

Red Hat Enterprise Linux Server release 6.6 (Santiago)

Python 2.6.6

软件:

cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm

instantclient-basic-linux.x64-11.2.0.4.0.zip

 

解压oracle client到opt目录:

unzip instantclient-basic-linux.x64-11.2.0.4.0.zip

cp -rf instantclient_11_2 /opt/

 

配置环境变量:

vi /etc/profile

export ORACLE_HOME=/opt/instantclient_11_2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME

source /etc/profile

 

安装cx_Oracle

sudo rpm -ivh cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm

 

[root@bx_34_32 report]# ls /usr/lib/python2.6/site-packages/cx_Oracle.so
/usr/lib/python2.6/site-packages/cx_Oracle.so

 

引入模块验证:

[root@bx_34_32 report]# python -c “import cx_Oracle;”

About 智足者富

http://chenpeng.info

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>