Socrates QE: Installation

Duco Dokter

Revision History
Revision $Revision: 1.2 $$Date: 2003/07/04 13:12:02 $$Author: wunderliebe $
Initial draft

Table of Contents

Introduction
Getting Socrates QE
Building the distribution
Prerequisites
Build properties
Building the WAR
Deploying Socrates QE
Prerequisites
Getting Socrates into Tomcat

Introduction

Socrates QE is distributed as a WAR file. This is simply a compressed archive, that can be unpacked with the jar command.

Getting Socrates QE

You can get either a prefab Socrates distro, or you can get the sources and build it yourself. To get the (bleeding edge) sources, type:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/socrates-qe login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/socrates-qe co socrates-qe
where you use your email address as your password for logging in. This will download the project files into your local directory. to get the distro, just get it at http://sourceforge.net/projects/socrates-qe/.

Building the distribution

If you have the WAR file, you may skip this section, unless you are still interested in building the WAR distribution yourself.

Prerequisites

Dependencies usually work as follows: if a version number is provided, anything newer is fine as well. However, distributions are not always backwards compatible, so beware! To be able to build the WAR file you need:
Ant 1.4

http://ant.apache.org/

Java 1.3 (duh)

http://java.sun.com/

Log4j 1.2.6

http://jakarta.apache.org/log4j/

JUnit

http://www.junit.org/

Servlet 2.3

http://java.sun.com/products/servlet/download.html

JDBC Optional Package 2.0

http://java.sun.com/products/jdbc/download.html

JDBC MySQL 2.0

http://www.mysql.com/downloads/api-jdbc.html

Velocity 1.2

http://jakarta.apache.org/velocity/

Xalan 2.4.0

http://xml.apache.org/xalan-j/

Verify form 1.1

http://www.w20e.com/projects/verify_form/verify_form.html

As far as we can tell, Socrates QE does run out of the box on Tomcat 4.x. It has not been tested on Tomcat 5.x yet. For Tomcat 3.x, it is nececarry to add some library jars in Tomcat's lib/common.
xercesImpl

xercesImpl-2.4.0.jar

xmlParserAPIs

xmlParserAPIs-2.4.0.jar

commons-collections

commons-collections-2.1.jar

Build properties

The build process is driven by ant. Ant uses the build.xml file for directives. Configuration of the build is done with the file build.props. If you require specific settings for your build environment, which you most probably do, don't change build.props: create a new file called build.myprops instead, and override only the options you wish to change. So say you would like to use your /usr/local/jdk-1.4.1a as your java home (ant's java_home), the contents of your build.myprops would be as follows:
java_home = /usr/local/jdk-1.4.1a

Building the WAR

In the socrates-qe directory, type: ant dist In theory, ant should now produce a file called socrates.war. This is all!

Deploying Socrates QE

This section describes how to get Socrates QE running on your machine. This section is not intended to provide info on how to create questionnaires. Check the questionnaire HOWTO on this topic.

Prerequisites

MySQL (Optional)

http://www.mysql.com/

Tomcat 3.2

http://jakarta.apache.org/tomcat/

Xerces 2.4.0

http://xml.apache.org/xerces2-j

Commons collections 2.1

http://jakarta.apache.org/commons/collections.html

Getting Socrates into Tomcat

This section describes the general installation procedure. Some of the following may not apply to your specific configuration of, for example, Tomcat or your JDK. Copy the Commons Collections and Xerces jars to your Tomcat home, into ./lib/common. N.B.: if you run Tomcat 4 or better, some libraries like Xerces are already part of the common libraries for Tomcat, so you're fine without separately deploying Xerces. Copy the socrates.war file to the webapp directory of Tomcat and re-start Tomcat. This will instantiate the application. The property file web.xml found in the WEB-INF directory of socrates should be modified to reflect local settings. See the document on configuration on all the configurable items. Restart Tomcat and type in your favourite browser (should be Mozilla :)):
http://your host:port/socrates/
Socrates should now be running, and the index page should get you further.