Installing Apache Tomcat 5.5 on Windows Vista and Windows 2003 Server

(by Brian Wilson, 9/23/07)


(Read a personal description of Backblaze here.)

Explanation:

For some of our purposes, we have decided to standardize on Tomcat 5.5 as our web server. 

Step #1: Install Java

We are currently using Java 1_5_0_14 which you can get by visiting http://java.sun.com and choosing for the correct platform.  We also copied this to our local intranet on file://whistler/bowl/software/www_software/java/5/jdk-1_5_0_14-windows-i586-p.exe for quick access.  Launch the installer, click "Next" a bunch.

ALSO -> Set up the JAVA_HOME environment variable to point to C:\Program Files\Java\jdk1.5.0_14 in the "System Properties" control panel.

Step #2: Install Tomcat

FOR SOME REASON THIS MUST BE RUN AS "Administrator" (not a user with Administrator rights). We are currently using Apache Tomcat 5.5.20 which you can get by visiting http://tomcat.apache.org/ and choosing the correct download.   We also copied this to our local intranet on \\whistler\bowl\software\www_software\tomcat\5.5.20\apache-tomcat-5.5.20.exe for quick access.  Click "Next" a lot, and when you get to the proper screen, make sure you select "Install as Server/Windows Service" checkbox.  You probably also want to change it to run on Port 80 (make sure Windows IIS is not installed and running on Port 80 first).

Step #3: Securing Tomcat 5 -> get rid of Tomcat 5 administration GUI login

By default Tomcat ships allowing anybody access to all admin functions, which is very bad, but simple to fix.  Shut down tomcat, then delete everything here: C:\Program Files\ Apache Software Foundation\Tomcat 5.0\webapps\* 

Step #4: Make Tomcat 5 serve up static html pages

In most cases you just want Tomcat 6 to serve up a bunch of static html pages without any Java or JSP.  Create the directories and then file so that this file exists: C:\Program Files\ Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\ROOT.xml and it should have this one line as it's entire contents: "<Context path="" docBase="C:\static_html_file_dir" />  where you have an "index.html" file here: C:\static_html_file_dir\index.html

Step #5: Make Tomcat 5 serve up custom dynamic ROOT.war pages

In our case on whistler, we want to be able to dynamically put a new ROOT.war and have Tomcat pick it up without restarting.  So create the directories and then file so that this file exists: C:\Program Files\ Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\stats.xml and it should have this one line as it's entire contents:
<Context path="/stats" docBase="C:\bowl\statsportalwarfile\stats.war" reloadable="true" />

 

Step #6: Optional Tomcat 5 Environment Variables

I don't think any of these are necessary, but you can set CATALINA_HOME in your System environment variables.

 

Step #7: Allow Tomcat 5 to use more memory

Go to "Start"->"All Programs"->"Apache Tomcat 5.5"->"Configure Tomcat" and in that dialog go to the "Java" tab, then change the "Initial memory pool and Maximum memory pool to both be 1024 MB (1 GB).

 


(Read a personal description of Backblaze here.)

Click Here to return to Ski-Epic Home, and Click Here to return to Random Stuff in Brian's Life