Difference between revisions of "Installing Oracle"

From EPrints Documentation
Jump to: navigation, search
(New page: This page is a working document. Oracle support hasn't been fully tested yet. == Requirements == * An Oracle database with an account that has full privileges * Install Oracle client...)
 
(Troubleshooting)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Installing EPrints Dependancies]]
 
   This page is a working document. Oracle support hasn't been fully tested yet.
 
   This page is a working document. Oracle support hasn't been fully tested yet.
 +
 +
Added in version 3.1.0.
  
 
== Requirements ==
 
== Requirements ==
  
* An Oracle database with an account that has full privileges
+
* An Oracle database with an account that has full privileges
* Install Oracle client
+
* Oracle database client
* Install [http://search.cpan.org/~pythian/DBD-Oracle-1.21/ DBD::Oracle]
+
* [http://search.cpan.org/~pythian/DBD-Oracle-1.21/ DBD::Oracle]
 +
 
 +
You should set the Oracle table character coding to "utf-8".
 +
 
 +
== Installing Oracle Express Edition ==
 +
 
 +
This is only required if you wish to use the free Oracle DB for testing/development purposes.
 +
 
 +
See [https://help.ubuntu.com/community/Oracle Oracle on Ubuntu].
 +
 
 +
== Adding Oracle Environment Variables ==
 +
 
 +
Make life with Oracle easier by adding the Oracle environment variables to the global system profile.
 +
 
 +
Create /etc/profile.d/oracle.sh (replace 10.2.0 with the correct version for your Oracle server/client):
 +
 
 +
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
 +
ORACLE_SID=XE
 +
PATH=$PATH:$ORACLE_HOME/bin
 +
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
 +
export ORACLE_HOME
 +
export ORACLE_SID
 +
export PATH
 +
export LD_LIBRARY_PATH
 +
 
 +
You will need to log out/in for this change to take effect.
 +
 
 +
== GQLPlus ==
 +
 
 +
The sqlplus tool has very poor shell support. For a better shell tool use [http://gqlplus.sourceforge.net/ gqlplus].
  
 
== Installation ==
 
== Installation ==
  
Install EPrints as normal but don't create a database.
+
Install EPrints as normal but don't create a (MySQL) database.
 +
 
 +
Edit archives/[repoid]/cfg/cfg.d/database.pl to add the Oracle configuration:
 +
 
 +
    #$c->{dbname} = 'eprints';
 +
    #$c->{dbhost} = 'localhost';
 +
    #$c->{dbport} = undef;
 +
    #$c->{dbsock} = undef;
 +
    $c->{dbdriver} = 'Oracle';
 +
    $c->{dbhost} = 'localhost';
 +
    $c->{dbsid} = 'XE';
 +
    $c->{dbuser} = 'HR';
 +
    $c->{dbpass} = 'HR';
 +
 
 +
dbsid is the name of the Oracle database.
 +
 
 +
Create the database and import subjects:
 +
 
 +
./bin/epadmin create_tables [repoid]
 +
./bin/import_subjects [repoid]
 +
./bin/epadmin create_user [repoid]
 +
 
 +
Continue configuring EPrints.
 +
 
 +
== Troubleshooting ==
 +
 
 +
Depending on your server configuration you may find you need to set environment variables for DBD::Oracle to find your Oracle client:
 +
 
 +
export ORACLE_SID=XE
 +
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
 +
 
 +
At the moment starting the indexer from the Admin page doesn't work, due to the Oracle environment variables not being present.
 +
 
 +
=== ORA-24327: need explicit attach before authenticating a user ===
 +
 
 +
Make sure you have set $c->{dbhost}.

Revision as of 11:28, 7 December 2010

 This page is a working document. Oracle support hasn't been fully tested yet.

Added in version 3.1.0.

Requirements

  • An Oracle database with an account that has full privileges
  • Oracle database client
  • DBD::Oracle

You should set the Oracle table character coding to "utf-8".

Installing Oracle Express Edition

This is only required if you wish to use the free Oracle DB for testing/development purposes.

See Oracle on Ubuntu.

Adding Oracle Environment Variables

Make life with Oracle easier by adding the Oracle environment variables to the global system profile.

Create /etc/profile.d/oracle.sh (replace 10.2.0 with the correct version for your Oracle server/client):

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export ORACLE_HOME
export ORACLE_SID
export PATH
export LD_LIBRARY_PATH

You will need to log out/in for this change to take effect.

GQLPlus

The sqlplus tool has very poor shell support. For a better shell tool use gqlplus.

Installation

Install EPrints as normal but don't create a (MySQL) database.

Edit archives/[repoid]/cfg/cfg.d/database.pl to add the Oracle configuration:

   #$c->{dbname} = 'eprints';
   #$c->{dbhost} = 'localhost';
   #$c->{dbport} = undef;
   #$c->{dbsock} = undef;
   $c->{dbdriver} = 'Oracle';
   $c->{dbhost} = 'localhost';
   $c->{dbsid} = 'XE';
   $c->{dbuser} = 'HR';
   $c->{dbpass} = 'HR';

dbsid is the name of the Oracle database.

Create the database and import subjects:

./bin/epadmin create_tables [repoid]
./bin/import_subjects [repoid]
./bin/epadmin create_user [repoid]

Continue configuring EPrints.

Troubleshooting

Depending on your server configuration you may find you need to set environment variables for DBD::Oracle to find your Oracle client:

export ORACLE_SID=XE
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

At the moment starting the indexer from the Admin page doesn't work, due to the Oracle environment variables not being present.

ORA-24327: need explicit attach before authenticating a user

Make sure you have set $c->{dbhost}.