Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. First setup port forwarding for this Oracle Virtual Machine
    1. Open up your VirtualBox Manager
    2. Select the Oracle Virtual Machine, and click the "Settings" button (at the top, looks like a gear)
    3. Go to the "Network" settings, and click "Port Forwarding" button at the bottom
    4. 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.
      1. sqlnet | TCP | Host Port: 1521 | Guest Port:1521
    5. You also may wish to add a new rule for SSH access (port 22), something like this:
      1. SSH | TCP | Host Port: 2200 | Guest Port: 22
    6. Test out your SSH access. From your host machine type:
      1. ssh -p 2200 oracle@localhost (password: oracle)
      2. Login as the "dspace" user: sqlplus dspace/dspace
  2. On the machine where your DSpace is installed, you will need to do the following:
    1. Download the latest Oracle OJDBC JAR from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
    2. 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
    3. 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
    4. 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
  3. At this point, your DSpace should be "connected" with the Oracle Virtual Machine. You should be able to simply do a "fresh_install" of DSpace, and startup your Tomcat to see it in action

    Code Block
    cd [src]/dspace/dspace-installer
    ant fresh_install
  4. You can also now login as the "dspace" database owner/user by simply SSHing into the Oracle Virtual Machine as follows:

    Code Block
    ssh -p 2200 oracle@localhost (password: oracle)
    sqlplus dspace/dspace

Install DSpace on Oracle Virtual Machine

...