The Open Anzo Project

Semantic Application Middleware

Basic Database Configuration

When running the Open Anzo server, there is a wide range of configuration properties that can be set. The primary properties that a user must always set are those dealing with the connection to the database. When the server is installed, inside the conf directory, there are a set of default files for the different types of database that Open Anzo supports. In order for the server to talk to the database, you need to edit the appropriate file in order to set the connection URL as well as the username and password for the database. Here are examples for the different database available:

DB2

The Open Anzo server has been tested with IBM DB/2 9.1.

Steps to running Open Anzo against DB2:

  1. Install DB2. DB2 Express C describes how to download and install the freely available DB2 Express C.
  2. Create a database for Open Anzo to use.
      Example: Within a DB2 command window or logged into the DB2 instance id
      db2 create database anzo using codeset utf-8 territory US
    
  3. Run the db2setup.bat or db2setup.sh script within bin/db2.
      Windows: While in a DB2 command window
        db2setup.bat [database name] [database username]
        example: db2setup.bat anzo db2inst1
    
      Linux/Unixes: While logged in as the instance owner
        db2setup.sh [database name]
        example: ./db2setup.sh anzo
    
  4. Stop and restart the DB2 instance.
      db2stop
      db2start
    
  5. Update the AnzoServer.properties.db2 file to correctly point to your database.
      org.openanzo.repository.database.user=[db2 username]
      org.openanzo.repository.database.password=[db2 password]
      org.openanzo.repository.database.url=jdbc:db2://[db2 server's hostname or ip address]:[db2 server's port]/[database name]
      org.openanzo.repository.database.type=ServerDB2
    
  6. Within either the anzo.bat or start.sh script, update the DB_LIB variable to point to the directory containing the db2 java libraries.
      Example:
       Windows anzo.bat:
        @echo off
        REM These two properties may require modification
        set DB_LIB="C:\Program Files\ibm\SQLLIB\java" <--Where this is the installation location of db2
        set ANZO_HOME=C:\openanzo-2.5\ <--Where this is the installation location of openanzo
        ...
    
       Linux/Unixes start.bat:
        #!/bin/bash
        # start.sh
        ANZO_HOME=$PWD/..
        ANZO_CONF=$ANZO_HOME/conf
        ANZO_LOGS=$ANZO_HOME/var
        ANZO_LIB=$ANZO_HOME/lib
    
        ####  SET PATH TO DB2 JAVA DIRECTORY, OR PATH TO LOCATION OF YOUR DATABASE JARS #######
        DB_LIB=/opt/ibm/db2/V9.1/java <---Where this is the installation location of db2
        ...
    

Oracle

The Open Anzo server has recently been tested with Oracle 10g.

  1. Update the AnzoServer.properties.oracle file to correctly point to your database.
      org.openanzo.repository.database.user=
      org.openanzo.repository.database.password=
      org.openanzo.repository.database.url=jdbc:oracle:thin:@localhost:1521
      org.openanzo.repository.database.type=ServerOracle
    
  1. Within either the anzo-oracle.bat or start-oracle.sh script, update the DB_LIB variable to point to the directory containing Oracle's java libraries.
      Example:
       Windows anzo-oracle.bat:
        @echo off
        REM These two properties may require modification
        set DB_LIB=[location of oracle installation]
        set ANZO_HOME=C:\openanzo-2.5\ <--Where this is the installation location of openanzo
        ...
    
       Linux/Unixes start-oracle.bat:
        #!/bin/bash
        # start.sh
        ANZO_HOME=$PWD/..
        ANZO_CONF=$ANZO_HOME/conf
        ANZO_LOGS=$ANZO_HOME/var
        ANZO_LIB=$ANZO_HOME/lib
    
        ####  SET PATH TO ORACLE JAVA DIRECTORY, OR PATH TO LOCATION OF YOUR DATABASE JARS #######
        DB_LIB=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/jdbc/lib <-- WHere this is the installation location of Oracle's jdbc libraries
        ...
    

PostgreSQL

The Open Anzo server has been tested with PostgreSQL 8.2.2.

  1. Update the AnzoServer.properties.postgres file to correctly point to your database.
      org.openanzo.repository.database.user=postgres
      org.openanzo.repository.database.password=
      org.openanzo.repository.database.url=jdbc:postgresql:anzo
      org.openanzo.repository.database.type=ServerPostgres
    
  1. Within either the anzo-postgres.bat or start-postgres.sh script, update the DB_LIB variable to point to the directory containing the Postgresql java libraries.
      Example:
       Windows anzo-postgres.bat:
        @echo off
        REM These two properties may require modification
        set DB_LIB=[location of postgres java libraries]
        set ANZO_HOME=C:\openanzo-2.5\ <--Where this is the installation location of openanzo
        ...
    
       Linux/Unixes start-postgres.bat:
        #!/bin/bash
        # start.sh
        ANZO_HOME=$PWD/..
        ANZO_CONF=$ANZO_HOME/conf
        ANZO_LOGS=$ANZO_HOME/var
        ANZO_LIB=$ANZO_HOME/lib
    
        ####  PATH TO LOCATION OF YOUR POSTGRESQL DATABASE JARS #######
        DB_LIB=/opt/postgres/postgresql-8.2-506.jdbc3.jar
        ...
    

Apache Derby

The Open Anzo server has been tested with Apache Derby 10.2.2.0.

  1. Update the AnzoServer.properties.derby file to correctly point to your database.
      org.openanzo.repository.database.user=anzo
      org.openanzo.repository.database.password=
      org.openanzo.repository.database.url=jdbc:derby:/tmp/anzoDerby;create=true;upgrade=true
      org.openanzo.repository.database.type=ServerDerby
    
  1. Within either the anzo-derby.bat or start-derby.sh script, update the DB_LIB variable to point to the directory containing the Derby java libraries.
      Example:
       Windows anzo-derby.bat:
        @echo off
        REM These two properties may require modification
        set DB_LIB=[location of derby java libraries]
        set ANZO_HOME=C:\openanzo-2.5\ <--Where this is the installation location of openanzo
        ...
    
       Linux/Unixes start-derby.sh:
        #!/bin/bash
        # start.sh
        ANZO_HOME=$PWD/..
        ANZO_CONF=$ANZO_HOME/conf
        ANZO_LOGS=$ANZO_HOME/var
        ANZO_LIB=$ANZO_HOME/lib
    
        ####  PATH TO LOCATION OF YOUR DERBY DATABASE JARS #######
        DB_LIB=/opt/db-derby-10.3.1.4-bin/lib
        ...
    

HSQLDB

The Open Anzo server has been tested with HSQLDB 1.8.0.

  1. Update the AnzoServer.properties.hsql file to correctly point to your database.
      org.openanzo.repository.database.user=sa
      org.openanzo.repository.database.password=
      org.openanzo.repository.database.url=jdbc:hsqldb:mem:anzodb
      org.openanzo.repository.database.type=ServerHSQL
    
  1. Within either the anzo-hsql.bat or start-hsql.sh script, update the DB_LIB variable to point to the directory containing the HSQL java libraries.
      Example:
       Windows anzo-hsql.bat:
        @echo off
        REM These two properties may require modification
        set DB_LIB=[location of hsqldb java libraries]
        set ANZO_HOME=C:\openanzo-2.5\ <--Where this is the installation location of openanzo
        ...
    
       Linux/Unixes start-hsql.sh:
        #!/bin/bash
        # start.sh
        ANZO_HOME=$PWD/..
        ANZO_CONF=$ANZO_HOME/conf
        ANZO_LOGS=$ANZO_HOME/var
        ANZO_LIB=$ANZO_HOME/lib
    
        ####  PATH TO LOCATION OF YOUR HSQL DATABASE JARS #######
        DB_LIB=/opt/hsqldb/lib
        ...
    
Copyright © 2007 - 2008 OpenAnzo.org