1.下载 cx_
Oracle
*
2.安装
[root@atyu30 opt]# rpm -ivh cx_Oracle-5.0.4-10g-py24-1.x86_64.rpm
Preparing... ########################################### [100%]
1:cx_Oracle ########################################### [100%]
3.装载模块
[root@atyu30 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
# Add for Python
/opt/oracle/product/10.2.0/db_1/lib/
[root@atyu30 ~]# ldconfig
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmastk.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmalk.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmadbg.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmeoci.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmuc.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmevq.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmevq.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmasf.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmeoci.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefos.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefsql.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmuk.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmadm.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefvr.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmasf.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmastk.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmarl.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefud.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmemso.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmuk.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmarl.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefut.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefw.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmuc.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefvr.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefos.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmemso.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmadbg.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefut.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefsql.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefw.so.0 is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmalk.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libordim10.soO is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmadm.so is empty, not checked.
ldconfig: File /opt/oracle/product/10.2.0/db_1/lib/libnmefud.so.0 is empty, not checked.
ldconfig: /opt/oracle/product/10.2.0/db_1/lib/libexpat.so.0 is not a symbolic link
5.测试
[root@atyu30 ~]#
[root@atyu30 ~]#
python
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2
20080704 (Red Hat 4.1.2-44)] on
linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>>
end
*from
http://blog.chinaunix.net/u/28922/showart_2290334.html