Installing to Linux
The installation is much simpler on a Linux than a Windows machine. The first thing you need to do is install the JDK. For our purposes, we will assume that the JDK will be installed to
After you have the JDK installed, you need to set the
JAVA_HOME environment variable. To do this under Linux,
find your shell in Table 2 and type the matching command. You will
need to replace
/bob/java with the root location of your
Table 2. Java Environment Settings
You should add the location of the Java interpreter to your
PATH environment variable.
You now need to extract the Tomcat server to a directory of your
choosing. This directory will become the
directory. For this installation, we will assume that Tomcat will be
The last step is to set the
variable. To do this under Linux, find your shell in Table 3 and type
the matching command. You will need to replace
the name of the directory located directly above your Tomcat
Table 3. Tomcat Environment Settings
Testing Your Tomcat Installation
To test the Tomcat installation, first start the Tomcat server. Table 4 contains the startup and shutdown commands for each OS.
Table 4. Tomcat Startup/Shutdown Commands
Once Tomcat has started, point your browser at
You should see a page similar to Figure 5.
If you would like to have all requests serviced on the default HTTP
port of 80, instead of port 8080, you will need to make
the following change to the
file and restart Tomcat.
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
port="8080" minProcessors="5" maxProcessors="75"
<!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
port="80" minProcessors="5" maxProcessors="75"
Now point your browser at
and you'll see results similar to those in Figure 5.
The next step is to verify the installation of your JDK, which is done by executing one of the JSP examples provided with the Tomcat server. At the page shown in Figure 5, choose JSP Examples. You should see a page similar to Figure 6.
Now choose the JSP example Date and select the Execute link. If everything was installed properly you should see a page similar to Figure 7 (of course with a different date).
If you do not see the previous page, then you need to make sure
that the location of your
JAVA_HOME environment variable
matches the location of your JDK installation.