1.环境
Linux boisheng-laptop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux
2.安装软件
sudo apt-get install oracle-xe-client
若没有wget
sudo dpkg -i oracle-xe-client_10.2.0.1-1.0_i386.deb
3.配置环境
在~/.bash_profile中添加(bash shell)
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=/usr/lib/oracle
export PATH=$PATH:$ORACLE_HOME:$ORACLE_HOME/bin
4.配置TNS
sudo vi /usr/lib/oracle/tnsnames.ora添加连接内容,例如
UTFCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.42.199)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = utfce)
)
)
4.运行sqlplus测试
boisheng@boisheng-laptop:~$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 9 16:34:29 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL>
5.安装依赖
sudo apt-get install autotools-dev debhelper docbook-xml docbook-xsl dpatch libqscintilla-dev texinfo xsltproc
kdebase-bin kdelibs4-dev这2个由于一下该成了--without-kde 所以不是非常必要
6.取得tora源码
sudo apt-get source tora
7.修改配置
修改源码里的debian/rules这个文件
把这行./configure --prefix=/usr --without-oracle --without-rpath --disable-new-check --with-kde --enable-libsuffix= --infodir=/usr/share/info
改成
./configure --prefix=/usr --with-oracle=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client --without-rpath --disable-new-check --without-kde --enable-libsuffix= --infodir=/usr/share/info
8.编译
sudo debian/rules binary
编译错误:checking oci works... configure: error: Couldn't compile and run a simpile OCI app.
sudo vi /etc/ld.so.conf.d/ora.conf 添加内容如下
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
sudo ldconfig
sudo apt-get remove tora
sudo dpkg -i tora_1.3.23-1_i386.deb
9.运行tora
可以看到支持Oracle的provider。
10.错误信息:
dpkg-shlibdeps: 失败: 未找到/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib/libclntsh.so.10.1的依赖关系信息 (被 debian/tora/usr/bin/tora使用)。
如果发生该错误可以跳过。vi debian/rules
将dh_shlibdeps 改为#dh_shlibdeps 跳过依赖检查.
阅读(2059) | 评论(0) | 转发(0) |