Rebuilding Tora with Oracle Support
I have done rebuilding Tora (I use version 1.3.18) with oracle support on Debian Sid (Unstable), so i wanna share it with everyone because this thing has given me a lot of headaches. Well, let’s go ahead ! Below are steps you should do :
1. Install Oracle Instant Client
You can get it from :
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
Get the RPM package and then convert it to debian package using alien.
# dpkg -i oracle-instantclient-basic_10.2.0.1-2_i386.deb
# dpkg -i oracle-instantclient-devel_10.2.0.1-2_i386.deb
# dpkg -i oracle-instantclient-sqlplus_10.2.0.1-2_i386.deb
Three steps above will instal OIC on /usr/lib/oracle
2. Create file named tnsnames.ora on /usr/lib/oracle and fill with lines like below :
CONSTR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.23.154.8)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = servtest)
)
)
3. Add line below to /etc/ld.so.conf :
/usr/lib/oracle/10.2.0.1/client/lib
Tell ld to reload its cache with :
# ldconfig
4. Add lines below to /etc/profile :
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.1/client/lib:$LD_LIBRARY_PATH
TNS_ADMIN=/usr/lib/oracle
export LD_LIBRARY_PATH TNS_ADMIN
5. Install Tora (tricky step in order to get all dependencies needed by tora
)
# apt-get install tora
6. Get Tora source
# cd /usr/src
# apt-get source tora
7. Prepare rebuilding tora
Install several packages needed for rebuilding :
# apt-get install g++ gcc autoconf automake flex zlib1g-dev docbook-xsl
# apt-get install libqt3-mt-dev libqt3-compat-headers
# cd tora-1.3.18/
Edit file debian/rules. Find line like below :
./configure –prefix=/usr –without-oracle –without-rpath –disable-new-check –with-kde –enable-libsuffix=
Replace with line like below :
./configure –prefix=/usr –with-instant-client –without-rpath –disable-new-check –without-kde –enable-libsuffix=
8. Rebuild Tora
# debian/rules binary
9. If nothing wrong you will get the deb on /usr/src. Next, you can install it :
# cd ..
Remove Tora first :
# apt-get remove tora
Install a new one :
# dpkg -i tora_1.3.18-2_i386.deb
10. Test the connection with sqlplus. If you use console then you must start a new one or relogin.
# sqlplus user/userpass@CONSTR
(BILLPM according to example lines of tnsnames.ora above)
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 7 19:58:12 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.3.0 - ProductionSQL>
Well …mission completed
!!
