ContentsPreviousNextTomcat-Book Project

This is the easiest part of using Tomcat. Its a simple case of downloading files, unpacking them, and running the startup script. I will mention four ways of installing it. These are:-

The Linux RPM installation was built by Henri Gomez and is the best way to get setup on Linux. The install also includes a SystemV startup script allowing for easy starting and stopping of the servcie, as well as starting at boot time. At the time of writing an RPM was not available for beta 6, although it was only released last night!

New since Tomcat 4 Beta 6 is a windows executable. This is new so may yet have bugs in it, but first reviews look positive. Definitely the best way to get it onto a Windows box. So easy I bet even Windows IIS admins can do it, although this is unconfirmed. 8o)

This leaves the zip install. Although more complex, it isn’t at all difficult. The first few stages are common to both methods of install.

1) Download the Java 2 SDK

Tomcat is written entirely in Java, with only the web server connectors being written in C/C++. This means that before you do anything else you need to install the Java 2 SDK standard edition. Do not download the JRE by mistake. Tomcat needs to compile Servlets and JSP pages so will need the compiler which only ships with the SDK. Version 1.3 of the SDK and above is recommended, although there is a report of a memory leak and threading problems in Sun’s 1.3.1 release so you may want to consider using 1.3.0 or even 1.4 (although this is still in Beta). Other companies produce compliant distributions of the Java Development Kit. One such JDK is available from IBM who have have fixed the memory bug that Sun’s SDK suffers from.

The relevant files can be found at:-

Sun’s Java 2 SDK Standard Edition:-

IBM’s JDK - “Jikes”

Blackdown SDK (Linux only)

2) Download Tomcat

The latest version of Tomcat can be found at http://jakarta.apache.org/site/binindex.html. There are three types of Tomcat build available; A release indicates a complete and stable edition, Milestone indicates a Beta-quality release (Currently Tomcat 4.0.1), and a likely unstable nightly build being compiled from Jakarta’s CVS repository every night. NB Tomcat 4 Beta 6 is regarded as a bad milestone build and should not be used.

The .tar.gz and .tar.Z files are intended for (nix Operating Systems (OS’), with the .Z indicating the old zip standard. You should download this if GZip is not installed on your server. A .zip file is provided for Windows users.

The instructions that follow are necessarily OS dependant.

3) Unpack Tomcat

If on a windowed system (X-Windows), you should open up a terminal. In a terminal, change to the diretory you downloaded the file into. Now move this file into /usr/local * as follows:-

mv jakarta-tomcat-4.0.1.tar.gz /usr/local/

On some systems, usually linux ones, servers should be installed into the /var/ directory for architectural reasons. It will still work correctly and is more of a preference issue between distributions.

Now change to the directory that the file resides in:-

cd /usr/local

Unpack the source. If tar is installed correctly and recognizes gzip then you can simply do the following:-

tar xzf jakarta-tomcat-4.0.1.tar.gz

If it isn’t then you can do this in two parts:-

gunzip jakarta-tomcat-4.0.1.tar.gz

tar xf jakarta-tomcat-4.0.1.tar

If you have downloaded the .Z file then do the following:-

uncompress jakarta-tomcat-4.0.1.tar.Z

tar xf jakarta-tomcat-4.0.1.tar

Not yet done - extrapolate from *nix notes for the moment.

ContentsPreviousNext