Build and Install Instructions

Requirements

Build instructions

SECTION I: Download Source Code

  1. Untar the tarball, or take the latest src from svn at http://svn.apache.org/repos/asf/incubator/lokahi/lokahi/trunk/
  2. Change directory (cd) to the home directory of lokahi.

SECTION II: Build Software

  1. Change directory (cd) to the home directory of lokahi.
  2. Edit the following properties in the build.properties file:

    tomcat.home=<YOUR_TOMCAT_HOME>
    app.name=lokahi
    app.virtuahost.name=
    app.authenticationmodule=org.apache.lokahi.core.common.authentication.NoAuthentication
    console.log.location=
    agent.log.location=
    database.uri=jdbc:oracle:thin:@<DATABASE_SERVER>:<PORT>:<DB_NAME>
    database.user=<SCHEMA>
    database.password=<PASSWORD>
    database.driver=oracle.jdbc.driver.OracleDriver
    inital.instance.name=
    inital.user.name=
    install.location=${tomcat.home}/webapps/

  3. Download external libraries to lib/ directory:
  4. a. classes12.jar -- from the oracle website
    b. jdom.jar -- Jdom version 1.0 from http://www.jdom.org/
    c. activation.jar -- from http://java.sun.com/products/javabeans/glasgow/jaf.html
    d. mail.jar -- from http://java.sun.com/products/javamail/

  5. Verify that JAVA_HOME is properly set to jdk1.5 in your shell.
  6. Run ant to build the package.

Install Instructions

SECTION III: Database Setup (Oracle)

  1. Change directory to build/lokahi/database/ directory.
  2. Database Administrator task: Create the lokahi schema <SCHEMA> in your Oracle database with default tablespace and enough quota on that tablespace (100 MB is sufficient for install).
  3. Database Administrator task: Run schema_priv.sql as DBA to grant system privileges to <SCHEMA>:
    > @schema_priv.sql <SCH>
  4. Login from sqlplus as <SCHEMA> and run:
    > @install.sql
    Install.sql will call recompile.sql to recompile any invalid object and report install status at the end. Make sure there is no invalid object and no error message in install.log and recompile.log
  5. Create the superuser. Login from sqlplus as <SCHEMA> and run:
    > @tmc_user_data.sql
    You will be prompted to enter a username, password, first name, last name, and email address. These will be used to create the superuser account.
    Then run:
    > @tmc_rel_function_user_data.sql
  6. Create the initial instance.
    > @tmc_instance_data.sql
    You can add more instances later via
    Administration -> Manage TMC -> Manage Instances -> Select Action -> Add

SECTION IV: Agent Install

  1. Copy the files in $LOKAHI_SOURCE/build/agent to a directory on each server.
  2. Start the agent by running:
  3. > $JAVA_HOME/bin/java -classpath $JAVA_HOME/lib/tools.jar:$AGENT_HOME/axis.jar:$AGENT_HOME/commons-dbcp-1.2.1.jar:$AGENT_HOME/commons-discovery-0.2.jar:$AGENT_HOME/commons-logging.jar:$AGENT_HOME/commons-pool-1.2.jar:$AGENT_HOME/derby.jar:$AGENT_HOME/derbyclient.jar:$AGENT_HOME/jaxrpc.jar:$AGENT_HOME/jdom.jar:$AGENT_HOME/log4j-1.2.13.jar:$AGENT_HOME/lokahi.jar:$AGENT_HOME/saaj.jar:$AGENT_HOME/wsdl4j-1.5.1.jar org.apache.lokahi.core.agent.TMCAgent start

SECTION V: Console Install

  1. Modify the web.xml in the <install.location> and set the JvmHttp parameter to the HTTP port of the jvm.
  2. Define the context in tomcats server.xml file and start tomcat.