How to install Tomcat on Windows & Linux

To install and configure Tomcat, first download the packages from the previously locations. You should choose the appropriate downloads based on your operating (We cover the steps involved in installing to both NT/2000 and Linux.)

Manually Installing to Windows XP/2000

The first installation we will be performing is for Windows XP/2000. The first thing you need to do is install the JDK. For this example, I am installing the JDK to drive D:, so therefore my JAVA_HOME directory is D:\jdk1.5.

Now you need to extract the Tomcat server to the directory where you want it to run. Again, I am installing to drive D:, which makes my TOMCAT_HOME directory D:\jakarta-tomcat.

After you have extracted Tomcat, you need to add two environment variables to the XP/2000 system: JAVA_HOME, which is the root directory of your JDK installation, and TOMCAT_HOME, which is the root directory of your Tomcat installation. To do this under XP/2000, perform the following steps:

  1. Open the XP/2000 control panel.
  2. Now start the XP/2000 system application and click on the Advanced tab.
  3. Next, click on the Environment Variables button.
  4. Now click on the New button on the System Variables section of the Environment Variables dialog box. Add a variable named JAVA_HOME and set its value to the location of your JDK installation.
  5. Your final step should be to repeat Step 4, but this time using TOMCAT_HOME for the variable name and the location of your Tomcat installation as the value. For my installation, I am setting the value to D:\jakarta-tomcat

Installing to Linux

Please note that Tomcat is pre-installed and comes free with our Linux VPS hosting

A Linux installation is a much simpler process compared to a Windows installation. The first thing you need to do is install the downloaded JDK. It is assumed that the JDK is installed to /user/java/jdk1.5.0_06.

After the JDK has been installed, you need to set the JAVA_HOME environment variable. To do this under Linux, find the shell that you are using in Table 1-3 and type the matching command.

You need to replace /user/java/jdk1.5.0_06 with the root location of your JDK installation.

JAVA_HOME Environment Commands
SHELL JAVA_HOME
bash JAVA_HOME=/user/java/jdk1.5.0_06;export JAVA_HOME
tsh setenv JAVA_HOME /user/java/jdk1.5.0_06

You now need to extract the Tomcat server to a directory of your choosing. This directory will become the TOMCAT_HOME directory. For this installation, we assume that Tomcat is installed to /var/tomcat.

The last step is to set the TOMCAT_HOME environment variable. Find the shell that you are using and type the matching command.

You need to replace /var/tomcat with the directory of your Tomcat installation!

TOMCAT_HOME Environment Commands
SHELL TOMCAT_HOME
bash TOMCAT_HOME=/var/tomcat;export TOMCAT_HOME
tsh setenv TOMCAT _HOME /var/tomcat

Contact sales!