Before you can start to install Hackystat itself, you must first install some important infrastructure: Java (the programming language and runtime environment for much of the Hackystat system), Ant (the build system used by Hackystat), and Tomcat (the web server used to host the Hackystat server). This section steps you through the installation of these tools after first checking to make sure you are running a compatible operating system.
Here are the known operating system requirements for the Hackystat server:
Table 8.1. OS Requirements
OS | Requirements |
|---|---|
Windows | Windows 2000 or XP Professional. (Windows 95/98/ME/XP-Home won't work.) |
Macintosh | OS/X 10.2 or later. |
Unix | Any Unix that runs Java. |
Download Java 1.5.0 or later from the Java website.
Note that you must download the "JDK" package that includes the compiler and other development tools, not just the "JRE" package that supports only end-user running of compiled applications.
To install Java, double click the downloaded installer file. Note that in Windows, you must manually change the installation directory for Java from the default of "C:\Program Files\Java\<version>" to a directory path that does not contain any spaces. We recommend that you specify the directory "C:\Java\<version>", but any directory path not containing spaces is acceptable.
Define an environment variable called JAVA_HOME specifying the directory containing your Java installation. For example, "C:\Java\jdk1.5.0_07" (no trailing slash).
Ensure that Java's bin directory is on your PATH variable. On Windows, for example, this involves right-clicking on "My Computer", selecting "Properties", clicking on the "Advanced" tab, clicking the "Environment Variables" button, and defining (or augmenting) a local definition of PATH with "C:\Java\jdk1.5.0_07\bin" (or wherever you have installed Java).
On the Macintosh or Unix, adding JAVA_HOME/bin to your path variable generally involves updating a "dot" file in the home directory in which you will run the Hackystat server.
Verify your Java installation by bringing up a shell window and typing "java -version". The response should indicate that Java 5 is installed. For example:
C:\public_hackystat\svn\hackyCore_Build>java -version java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b03) Java HotSpot(TM) Client VM (build 1.5.0_b03, mixed mode, sharing)
Download Tomcat 5.5.20 or later, available from the Apache Tomcat website.
Note that you should not download the Tomcat ".exe" installer file for Windows. Instead, download the .zip or .tar.gz file, typically named something like "apache-tomcat-5.5.20.zip".
To install Tomcat, simply unzip the .zip file, or uncompress the .tar.gz file. Note that you should not install Tomcat into a directory containing spaces, such as "C:\Program Files". Instead, we recommend that you create a top-level directory called 'public_hackystat' under which you maintain your Tomcat (and Ant, and Hackystat distributions). This will facilitate debugging if you encounter problems during installation.
Define an environment variable called CATALINA_HOME specifying the directory containing your Tomcat installation. For example, on Windows an appropriate value might be: "c:\public_hackystat\apache-tomcat-5.5.20" (no trailing slash). A Unix example is: "/Users/johnson/public_hackystat/apache-tomcat-5.5.20".
Define an environment variable called CATALINA_OPTS with the value "-Xmx128M -Xms96M". This increases the minimum and maximum heap sizes. If you can go even higher, that's good too.
![]() | Note |
|---|---|
For Unix users: If you are running Hackystat on a "headless" server (i.e. without X Windows running), then add "-Djava.awt.headless=true" to CATALINA_OPTS. | |
Ensure that Tomcat's bin directory is on your PATH variable. On Windows, for example, this involves right-clicking on "My Computer", selecting "Properties", clicking on the "Advanced" tab, clicking the "Environment Variables" button, and defining (or augmenting) a local definition of PATH with "c:\public_hackystat\apache-tomcat-5.5.20\bin" (or wherever you have installed Ant).
On the Macintosh or Unix, adding Tomcat's bin directory to your PATH variable generally involves updating a "dot" file in the home directory in which you will run the Hackystat server. For example, on the Macintosh OS/X 10.4 you might edit the .profile file to include the line: "export PATH=$PATH:/Users/johnson/public_hackystat/apache-tomcat-5.5.20/bin"
Verify your installation by bringing up Tomcat (using a script like 'startup.bat' for Windows or 'catalina.sh run' for Unix.) The script should produce output like the following:
C:\public_hackystat\svn\hackyCore_Build>startup Using CATALINA_BASE: c:\public_hackystat\apache-tomcat-5.5.20 Using CATALINA_HOME: c:\public_hackystat\apache-tomcat-5.5.20 Using CATALINA_TMPDIR: c:\public_hackystat\apache-tomcat-5.5.20\temp Using JAVA_HOME: c:\Java\jdk1.5.0_07
You can also verify the installation by retrieving the Tomcat default web application home page with the url http://localhost:8080/.
Now bring Tomcat down (using a script like 'shutdown.bat' for Windows or 'shutdown.sh' for Unix).
To support Ant-based deployment of Hackystat, you must set up the Tomcat admin and manager roles and associated usernames and passwords. Once Tomcat is down, edit the <CATALINA_HOME>/conf/tomcat-users.xml file so that it looks similar to the following (but with your own username and password):
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="admin"/> <role rolename="manager"/> <user username="hackyAdmin" password="changethis" roles="admin,manager"/> </tomcat-users>
To verify that this is set up correctly, bring Tomcat up once more and go to http://localhost:8080/manager/html, and enter your username and password. You should obtain access to the Tomcat Web Application manager.
If directory browsing is enabled, then any user can inspect any other user's hackystat files. To disable directory browsing, edit the file "web.xml" in Tomcat's config directory. Change the value of the parameter "listings" in the servlet named "default" from "true" to "false".
In many cases, you will want to change your server to run on some other port than the default port of 8080. To change the port number that Tomcat runs on, edit the file "server.xml" in the Tomcat config directory. Change the value of the "port" attribute for the first defined <connector> from 8080 to whatever port you want. The standard port for web servers is 80.
Download Ant 1.6.5 or later, available from the Apache Ant website.
To install Ant, simply unzip the .zip file, or uncompress the .tar.gz file. Note that you should not install Ant into a directory containing spaces, such as "C:\Program Files". Instead, we recommend that you create a top-level directory called 'public_hackystat' under which you maintain your Tomcat (and Ant, and Hackystat distributions). This will facilitate debugging if you encounter problems during installation.
Define an environment variable called ANT_HOME specifying the directory containing your Ant installation. For example, "c:\public_hackystat\apache-ant-1.6.5" (no trailing slash).
Ensure that Ant's bin directory is on your PATH variable. On Windows, for example, this involves right-clicking on "My Computer", selecting "Properties", clicking on the "Advanced" tab, clicking the "Environment Variables" button, and defining (or augmenting) a local definition of PATH with "c:\public_hackystat\apache-ant-1.6.5\bin" (or wherever you have installed Ant).
On the Macintosh or Unix, adding Ant's bin to your PATH variable generally involves updating a "dot" file in the home directory in which you will run the Hackystat server. For example, on the Macintosh OS/X 10.4 you might edit the .profile file to include the line: "export PATH=$PATH:/Users/johnson/public_hackystat/apache-tomcat-5.5.20/bin:/Users/johnson/public_hackystat/apache-ant-1.6.5/bin"