特殊:Badtitle/NS100:HowToBuildToraWithOracle:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第4行: | 第4行: | ||
The "tora" database client package in Feisty Fawn comes with Postgres support, and MySQL if you have the libraries. This How-To shows you how to build Oracle Instantclient 10g support into tora. | The "tora" database client package in Feisty Fawn comes with Postgres support, and MySQL if you have the libraries. This How-To shows you how to build Oracle Instantclient 10g support into tora. | ||
This is client only. You will not install the whole Oracle database. | This is client only. You will not install the whole Oracle database. | ||
BTW, if you don't have time to build the whole thing, [[ | BTW, if you don't have time to build the whole thing, [[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.21-3ubuntu1_i386.deb%7Chere%5D%5D is the .deb package I built using this How-To. It's x386 only, and you'll need to have instantclient installed before you can use it. | ||
[[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.22-5_i386.deb%5D%5D is an updated .deb package for instantclient 11.1.0.1 and tora 1.3.22. | |||
=== First Step: Install Oracle Instantclient === | === First Step: Install Oracle Instantclient === | ||
* Download the Oracle Instantclient files from here [http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html]. You will need "oracle-instantclient-basiclite- | * Download the Oracle Instantclient files from here [[http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html]]. You will need "oracle-instantclient-basiclite-11.1.0.1-1.i386.rpm", "oracle-instantclient-sqlplus-11.1.0.1-1.i386.rpm", and "oracle-instantclient-devel-11.1.0.1-1.i386.rpm". | ||
* Convert these .rpm files into .deb packages and install using "alien" ("sudo apt-get install alien" if you don't have it): | * Convert these .rpm files into .deb packages and install using "alien" ("sudo apt-get install alien" if you don't have it): | ||
<pre><nowiki> alien -i oracle-instantclient-basiclite- | <pre><nowiki> | ||
alien -i oracle-instantclient-sqlplus- | alien -i oracle-instantclient-basiclite-11.1.0.1-1.i386.rpm | ||
alien -i oracle-instantclient-devel- | alien -i oracle-instantclient-sqlplus-11.1.0.1-1.i386.rpm | ||
alien -i oracle-instantclient-devel-11.1.0.1-1.i386.rpm | |||
</nowiki></pre> | |||
* Test your Instantclient install by using "sqlplus" to connect to your database: | * Test your Instantclient install by using "sqlplus" to connect to your database: | ||
<pre><nowiki> sqlplus username/password@//dbhost:1521/SID | <pre><nowiki> | ||
sqlplus username/password@//dbhost:1521/SID | |||
</nowiki></pre> | </nowiki></pre> | ||
If sqlplus complains of a missing libaio.so.1 file, run "sudo apt-get install libaio1". | |||
If all is well, move on to compiling "tora" | If all is well, move on to compiling "tora" | ||
=== Second Step: Build Tora === | === Second Step: Build Tora === | ||
* Install some required libraries: | * Install some required libraries: | ||
<pre><nowiki> apt-get install build-essential g++ gcc autoconf automake flex zlib1g-dev docbook-xsl | <pre><nowiki> | ||
apt-get install build-essential g++ gcc autoconf automake flex zlib1g-dev docbook-xsl | |||
apt-get install libqt3-mt-dev libqt3-compat-headers libqscintilla-dev | apt-get install libqt3-mt-dev libqt3-compat-headers libqscintilla-dev | ||
apt-get install debhelper | |||
</nowiki></pre> | </nowiki></pre> | ||
* Make Ubuntu recognize the Oracle libraries. Create a new file as follows: | * Make Ubuntu recognize the Oracle libraries. Create a new file as follows: | ||
<pre><nowiki> sudo vi /etc/ld.so.conf.d/oracle.conf | <pre><nowiki> | ||
sudo vi /etc/ld.so.conf.d/oracle.conf | |||
</nowiki></pre> | </nowiki></pre> | ||
and add this line: | and add this line: | ||
<pre><nowiki> /usr/lib/oracle/ | <pre><nowiki> | ||
/usr/lib/oracle/11.1.0.1/client/lib | |||
</nowiki></pre> | </nowiki></pre> | ||
then do: | then do: | ||
<pre><nowiki> sudo ldconfig | <pre><nowiki> | ||
sudo ldconfig | |||
</nowiki></pre> | </nowiki></pre> | ||
You can also just add the above line to the LD_LIBRARY_PATH environment variable instead of the above. | You can also just add the above line to the LD_LIBRARY_PATH environment variable instead of the above. | ||
* Download the tora source code: | * Download the tora source code: | ||
<pre><nowiki> sudo apt-get source tora | <pre><nowiki> | ||
sudo apt-get source tora | |||
</nowiki></pre> | </nowiki></pre> | ||
* Edit some build lines for Instantclient: | * Edit some build lines for Instantclient: | ||
<pre><nowiki> cd /usr/src/tora-1.3.21 | <pre><nowiki> | ||
cd /usr/src/tora-1.3.21 | |||
sudo vi debian/rules | sudo vi debian/rules | ||
</nowiki></pre> | </nowiki></pre> | ||
change the line: | change the line: | ||
<pre><nowiki> ./configure --prefix=/usr --without-oracle --without-rpath --disable-new-check --with-kde --enable-libsuffix= | <pre><nowiki> | ||
./configure --prefix=/usr --without-oracle --without-rpath --disable-new-check --with-kde --enable-libsuffix= | |||
</nowiki></pre> | </nowiki></pre> | ||
to look like this: | to look like this: | ||
<pre><nowiki> ./configure --prefix=/usr --with-instantclient --with-oracle-includes=/usr/include/oracle/ | <pre><nowiki> | ||
./configure --prefix=/usr --with-instantclient --with-oracle-includes=/usr/include/oracle/11.1.0.1/client --without-kde --without-rpath --disable-new-check --enable-libsuffix= | |||
</nowiki></pre> | </nowiki></pre> | ||
* Now you're ready to build. First become root: | * Now you're ready to build. First become root: | ||
<pre><nowiki> sudo -i | <pre><nowiki> | ||
sudo -i | |||
</nowiki></pre> | </nowiki></pre> | ||
* Then set ORACLE_HOME to point to the appropriate place (you should also set this in your .bash_profile: | * Then set ORACLE_HOME to point to the appropriate place (you should also set this in your .bash_profile: | ||
<pre><nowiki> export ORACLE_HOME=/usr/lib/oracle/ | <pre><nowiki> | ||
export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client | |||
</nowiki></pre> | </nowiki></pre> | ||
* Then build: | * Then build: | ||
<pre><nowiki> cd /usr/src/tora-1.3.21 | <pre><nowiki> | ||
cd /usr/src/tora-1.3.21 | |||
debian/rules binary | debian/rules binary | ||
</nowiki></pre> | </nowiki></pre> | ||
If all goes well, after a "'long'" time, you should end up with a file in <code><nowiki>/usr/src</nowiki></code> called "tora_1.3.21-3ubuntu1_i386.deb". You can install it like this: | If all goes well, after a "'long'" time, you should end up with a file in <code><nowiki>/usr/src</nowiki></code> called "tora_1.3.21-3ubuntu1_i386.deb". You can install it like this: | ||
<pre><nowiki> dpkg - | <pre><nowiki> | ||
dpkg -i tora_1.3.21-3ubuntu1_i386.deb | |||
</nowiki></pre> | </nowiki></pre> | ||
=== Step Three: Using Tora to connect to an Oracle database === | === Step Three: Using Tora to connect to an Oracle database === | ||
* Start "tora". | * Start "tora". | ||
* In the connect box make sure the connection provide says "Oracle. Then enter an Instantclient connect string in the boxes. Put "username" and "password" in the appropriate places. Then put the string <code><nowiki>//dbhost:<portno>/SID</nowiki></code> in the "Database" box. [[ | * In the connect box make sure the connection provide says "Oracle. Then enter an Instantclient connect string in the boxes. Put "username" and "password" in the appropriate places. Then put the string <code><nowiki>//dbhost:<portno>/SID</nowiki></code> in the "Database" box. [[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora-connect.png%7CHere%5D%5D is a picture. | ||
---- | ---- | ||
This How-To owes thanks to [http://www.benpinter.net/article.php?story=20051208034638928 this] page from Ben Pinter; | This How-To owes thanks to [[http://www.benpinter.net/article.php?story=20051208034638928|this]] page from Ben Pinter; | ||
[[UbuntuHelp:tOraOracleSetUpHowTo|this]] page, which was a bit outdated; and [http://ubuntuforums.org/showthread.php?t=92528 this] entry on Ubuntuforums. | [[UbuntuHelp:tOraOracleSetUpHowTo|this]]|page, which was a bit outdated; and [[http://ubuntuforums.org/showthread.php?t=92528|this]] entry on Ubuntuforums. | ||
---- | ---- | ||
[[category:CategorySoftware]] [[category:CategoryDocumentation]] | [[category:CategorySoftware]] [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2008年10月19日 (日) 05:53的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/HowToBuildToraWithOracle }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/af | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Afrikaans| [[::HowToBuildToraWithOracle/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ar | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|العربية| [[::HowToBuildToraWithOracle/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/az | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|azərbaycanca| [[::HowToBuildToraWithOracle/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/bcc | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|جهلسری بلوچی| [[::HowToBuildToraWithOracle/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/bg | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|български| [[::HowToBuildToraWithOracle/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/br | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|brezhoneg| [[::HowToBuildToraWithOracle/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ca | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|català| [[::HowToBuildToraWithOracle/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/cs | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|čeština| [[::HowToBuildToraWithOracle/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/de | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Deutsch| [[::HowToBuildToraWithOracle/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/el | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Ελληνικά| [[::HowToBuildToraWithOracle/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/es | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|español| [[::HowToBuildToraWithOracle/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/fa | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|فارسی| [[::HowToBuildToraWithOracle/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/fi | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|suomi| [[::HowToBuildToraWithOracle/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/fr | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|français| [[::HowToBuildToraWithOracle/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/gu | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|ગુજરાતી| [[::HowToBuildToraWithOracle/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/he | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|עברית| [[::HowToBuildToraWithOracle/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/hu | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|magyar| [[::HowToBuildToraWithOracle/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/id | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Bahasa Indonesia| [[::HowToBuildToraWithOracle/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/it | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|italiano| [[::HowToBuildToraWithOracle/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ja | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|日本語| [[::HowToBuildToraWithOracle/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ko | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|한국어| [[::HowToBuildToraWithOracle/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ksh | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Ripoarisch| [[::HowToBuildToraWithOracle/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/mr | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|मराठी| [[::HowToBuildToraWithOracle/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ms | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Bahasa Melayu| [[::HowToBuildToraWithOracle/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/nl | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Nederlands| [[::HowToBuildToraWithOracle/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/no | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|norsk| [[::HowToBuildToraWithOracle/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/oc | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|occitan| [[::HowToBuildToraWithOracle/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/pl | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|polski| [[::HowToBuildToraWithOracle/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/pt | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|português| [[::HowToBuildToraWithOracle/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ro | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|română| [[::HowToBuildToraWithOracle/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/ru | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|русский| [[::HowToBuildToraWithOracle/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/si | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|සිංහල| [[::HowToBuildToraWithOracle/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/sq | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|shqip| [[::HowToBuildToraWithOracle/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/sr | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|српски / srpski| [[::HowToBuildToraWithOracle/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/sv | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|svenska| [[::HowToBuildToraWithOracle/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/th | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|ไทย| [[::HowToBuildToraWithOracle/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/tr | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Türkçe| [[::HowToBuildToraWithOracle/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/vi | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|Tiếng Việt| [[::HowToBuildToraWithOracle/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/yue | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|粵語| [[::HowToBuildToraWithOracle/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/zh | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|中文| [[::HowToBuildToraWithOracle/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/zh-hans | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|中文(简体)| [[::HowToBuildToraWithOracle/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowToBuildToraWithOracle | UbuntuHelp:HowToBuildToraWithOracle | {{#if: | :}}HowToBuildToraWithOracle}}/zh-hant | • {{#if: UbuntuHelp:HowToBuildToraWithOracle|中文(繁體)| [[::HowToBuildToraWithOracle/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:HowToBuildToraWithOracle|:HowToBuildToraWithOracle|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :HowToBuildToraWithOracle/zh | | {{#ifexist: HowToBuildToraWithOracle/zh | | {{#ifeq: {{#titleparts:HowToBuildToraWithOracle|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:HowToBuildToraWithOracle|1|-1|}} | zh | | }}
Installing Tora with Oracle Support
The "tora" database client package in Feisty Fawn comes with Postgres support, and MySQL if you have the libraries. This How-To shows you how to build Oracle Instantclient 10g support into tora. This is client only. You will not install the whole Oracle database. BTW, if you don't have time to build the whole thing, [[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.21-3ubuntu1_i386.deb%7Chere%5D%5D is the .deb package I built using this How-To. It's x386 only, and you'll need to have instantclient installed before you can use it. [[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.22-5_i386.deb%5D%5D is an updated .deb package for instantclient 11.1.0.1 and tora 1.3.22.
First Step: Install Oracle Instantclient
- Download the Oracle Instantclient files from here [[1]]. You will need "oracle-instantclient-basiclite-11.1.0.1-1.i386.rpm", "oracle-instantclient-sqlplus-11.1.0.1-1.i386.rpm", and "oracle-instantclient-devel-11.1.0.1-1.i386.rpm".
- Convert these .rpm files into .deb packages and install using "alien" ("sudo apt-get install alien" if you don't have it):
alien -i oracle-instantclient-basiclite-11.1.0.1-1.i386.rpm alien -i oracle-instantclient-sqlplus-11.1.0.1-1.i386.rpm alien -i oracle-instantclient-devel-11.1.0.1-1.i386.rpm
- Test your Instantclient install by using "sqlplus" to connect to your database:
sqlplus username/password@//dbhost:1521/SID
If sqlplus complains of a missing libaio.so.1 file, run "sudo apt-get install libaio1". If all is well, move on to compiling "tora"
Second Step: Build Tora
- Install some required libraries:
apt-get install build-essential g++ gcc autoconf automake flex zlib1g-dev docbook-xsl apt-get install libqt3-mt-dev libqt3-compat-headers libqscintilla-dev apt-get install debhelper
- Make Ubuntu recognize the Oracle libraries. Create a new file as follows:
sudo vi /etc/ld.so.conf.d/oracle.conf
and add this line:
/usr/lib/oracle/11.1.0.1/client/lib
then do:
sudo ldconfig
You can also just add the above line to the LD_LIBRARY_PATH environment variable instead of the above.
- Download the tora source code:
sudo apt-get source tora
- Edit some build lines for Instantclient:
cd /usr/src/tora-1.3.21 sudo vi debian/rules
change the line:
./configure --prefix=/usr --without-oracle --without-rpath --disable-new-check --with-kde --enable-libsuffix=
to look like this:
./configure --prefix=/usr --with-instantclient --with-oracle-includes=/usr/include/oracle/11.1.0.1/client --without-kde --without-rpath --disable-new-check --enable-libsuffix=
- Now you're ready to build. First become root:
sudo -i
- Then set ORACLE_HOME to point to the appropriate place (you should also set this in your .bash_profile:
export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client
- Then build:
cd /usr/src/tora-1.3.21 debian/rules binary
If all goes well, after a "'long'" time, you should end up with a file in /usr/src
called "tora_1.3.21-3ubuntu1_i386.deb". You can install it like this:
dpkg -i tora_1.3.21-3ubuntu1_i386.deb
Step Three: Using Tora to connect to an Oracle database
- Start "tora".
- In the connect box make sure the connection provide says "Oracle. Then enter an Instantclient connect string in the boxes. Put "username" and "password" in the appropriate places. Then put the string
//dbhost:<portno>/SID
in the "Database" box. [[https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora-connect.png%7CHere%5D%5D is a picture.
This How-To owes thanks to [[2]] page from Ben Pinter; this|page, which was a bit outdated; and [[3]] entry on Ubuntuforums.