...
- First setup port forwarding for this Oracle Virtual Machine
- Open up your VirtualBox Manager
- Select the Oracle Virtual Machine, and click the "Settings" button (at the top, looks like a gear)
- Go to the "Network" settings, and click "Port Forwarding" button at the bottom
- By default, you should already see a port forwarding rule for "sqlnet" which looks like this. You can modify that if you wish, or leave as-is.
- sqlnet | TCP | Host Port: 1521 | Guest Port:1521
- You also may wish to add a new rule for SSH access (port 22), something like this:
- SSH | TCP | Host Port: 2200 | Guest Port: 22
- Test out your SSH access. From your host machine type:
ssh -p 2200 oracle@localhost
(password: oracle)
- On the machine where your DSpace is installed, you will need to do the following:
- Download the latest Oracle OJDBC JAR from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
Install this JAR into your local Maven cache (~/.m2):
Code Block mvn install:install-file -Dfile=[path-to-downloads]/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4.0 -Dpackaging=jar -DgeneratePom=true # NOTE: If you are on Windows, each of the "-D" params need to be surrounded with double-quotes
Update your build.properties database settings to refer to this Oracle database on the virtual machine. Pay close attention to the port, if you changed the default port forwarding rule for "sqlnet":
Code Block # oracle db.driver=oracle.jdbc.OracleDriver db.url=jdbc:oracle:thin:@//localhost:1521/orcl db.username=dspace db.password=dspace
Rebuild your DSpace with Oracle enabled:
Code Block mvn -Ddb.name=oracle package # NOTE: If the version of the Oracle OJDBC JAR has changed, you may need to update the Parent POM to have the correct version # See the "com.oracle" dependency: https://github.com/DSpace/DSpace/blob/master/pom.xml#L1082 # NOTE #2: If you are on Windows, the "-D" param needs to be surrounded with double-quotes
Install DSpace on Oracle Virtual Machine
...