特殊:Badtitle/NS100:HowToBuildToraWithOracle:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Wikibot留言 | 贡献
无编辑摘要
Wikibot留言 | 贡献
无编辑摘要
第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, [https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.21-3ubuntu1_i386.deb here] 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.
BTW, if you don't have time to build the whole thing, [[UbuntuHelp:HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora_1.3.21-3ubuntu1_i386.deb|here]] 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.
=== 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-10.2.0.3-1.i386.rpm", "oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm", and "oracle-instantclient-devel-10.2.0.3-1.i386.rpm".
* 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-10.2.0.3-1.i386.rpm", "oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm", and "oracle-instantclient-devel-10.2.0.3-1.i386.rpm".
第58行: 第58行:
=== 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.  [https://help.ubuntu.com/community/HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora-connect.png Here] is a picture.
* 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.  [[UbuntuHelp:HowToBuildToraWithOracle?action=AttachFile&do=get&target=tora-connect.png|Here]] 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;
[https://help.ubuntu.com/community/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]]

2007年12月8日 (六) 09:41的版本

{{#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, here 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.

First Step: Install Oracle Instantclient

  • Download the Oracle Instantclient files from here [1]. You will need "oracle-instantclient-basiclite-10.2.0.3-1.i386.rpm", "oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm", and "oracle-instantclient-devel-10.2.0.3-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-10.2.0.3-1.i386.rpm
alien -i oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm
alien -i oracle-instantclient-devel-10.2.0.3-1.i386.rpm 
  • Test your Instantclient install by using "sqlplus" to connect to your database:
 sqlplus  username/password@//dbhost:1521/SID

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
  • 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/10.2.0.3/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/10.2.0.3/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/10.2.0.3/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 -r 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. Here is a picture.

This How-To owes thanks to this page from Ben Pinter; this page, which was a bit outdated; and this entry on Ubuntuforums.