This page briefly describes how to set up a DSpace test instance that runs with the Oracle DB. Note that this method is not suitable for production environments; rather it is intended for committers and other community members who don't normally have access to an Oracle database but wish to test patches and other code relevant to DSpace with Oracle.
Steps
Install Virtualbox
You will need Oracle VM Virtualbox. Binaries for all major operating sytems are available free of charge from https://www.virtualbox.org/.
Download and import virtual machine image
Oracle makes available virtual machine images for developers. You need to register for a free Oracle Tech Network account and agree to various license agreements.
Download the Database App Development VM image from http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html and import it into virtualbox as a new appliance. I increased the memory for the virtual machine to 3 GB.
On the virtual machine
Start the virtual machine (as per instructions on the download page, use username+password oracle).
Set up the database
Open a terminal and log on to the database as a superuser (password: oracle):
sqlplus logon AS SYSDBA
Then create the database user and database (which is referred to as a "schema" in oracle terms):
CREATE USER dspace IDENTIFIED BY dspace; GRANT CONNECT TO dspace; GRANT CREATE TABLE TO dspace; GRANT CREATE SEQUENCE TO dspace; GRANT CREATE VIEW TO dspace; GRANT UNLIMITED TABLESPACE TO dspace;
(Thanks to ~pottingerhj@umsystem.edu for the SQL statements.)
The remainder of this how-to assumes that you wish to run a test DSpace instance in the virtual machine. If you prefer to run DSpace on the host machine instead, you could instead set up port forwarding for the Virtualbox appliance and use only the database in the virtual machine. In that case, skip the rest of this how-to.
Install build tools
The virtual machine image comes with ant preinstalled, but the version is too old (1.6.4). There is no maven installation on the machine.
Download the binary distributions of ant and maven (2.2.x) from http://ant.apache.org/ and http://maven.apache.org and install them on the virtual machine, for example into ~/software. I symlinked the directories created by unpacking the tarballs so that I had ant in ~/software/ant and maven in ~/software/maven, so I'll use those paths in the rest of the instructions. You'll need to add ~/software/ant/bin and ~/software/maven/bin to the beginning of your PATH variable; eg put at the end of ~/.bash_profile:
export PATH=$HOME/software/ant/bin:$HOME/software/maven/bin:$PATH
You will need to log out and back in to make these settings apply, or type
source ~/.bash_profile
If ant -version shows that you are still running the old version of ant, try also adding this to ~/.bash_profile:
export ANT_HOME=$HOME/software/ant/bin
Build + install DSpace
Download the source distribution of DSpace (https://github.com/DSpace/DSpace/archive/dspace-3.0.tar.gz for DSpace 3.0) and unpack the tarball. I then renamed the directory to ~/dspace-src.
Create the directory ~/dspace.
Follow the standard DSpace 3.x installation instructions to configure, build and install DSpace. Change your build.properties file (leave everything else as-is):
dspace.install.dir=/home/oracle/dspace ... db.name=oracle ... # Uncomment the appropriate block below for your database. # postgres #db.driver=org.postgresql.Driver #db.url=jdbc:postgresql://localhost:5432/dspace #db.username=dspace #db.password=dspace # oracle db.driver= oracle.jdbc.OracleDriver db.url=jdbc:oracle:thin:@//localhost:1521/orcl db.username=dspace db.password=dspace ...
I also disabled the mail server in ~/dspace-src/dspace/config/dspace.cfg.
It may not be readily apparent from the example config lines above, but the SID used by the Oracle VirtualBox image is "orcl".
Install Tomcat
Tomcat isn't installed on the virtual machine. Download the binary distribution from http://tomcat.apache.org/; I used Tomcat 6 and installed it into ~/software/tomcat by unpacking the downloaded tarball and symlinking the directory. You will also need to copy the ojdbc6.jar file that you downloaded in the previous step into ~/software/tomcat/lib.
Use your preferred method to link up Tomcat with the DSpace webapps that you need. I placed symlinks to ~/dspace/webapps/xmlui and ~/dspace/webapps/solr into ~/software/tomcat/webapps after first removing everything from ~/software/tomcat/webapps.
Start tomcat by running
cd ~/software/tomcat && ./bin/startup.sh
and your DSpace+Oracle instance should come up at http://localhost:8080/xmlui/.