Tomcat installation is very simple, and can be describes as "Unpack and Run". These instructions were written using Tomcat 6.0.14 but any recent 6.x version should work. If you are comfortable with the CLI, these the following quick instructions will get you going ASAP; otherwise skip to the OPENEJB:Download Tomcat section.
Download Tomcat 6 zip file from here .
Unpack the Tomcat zip file which will create a new directory containing the complete Tomcat installation.
C:>dir apache-tomcat-6.0.14 Volume in drive C has no label. Volume Serial Number is 0000-0000
Directory of C:\apache-tomcat-6.0.14
09/20/2007 09:14 PM
{card:label=Unix}{noformat:nopanel=true}
$ jar -xvf apache-tomcat-6.0.14.zip
created: apache-tomcat-6.0.14/
created: apache-tomcat-6.0.14/bin/
created: apache-tomcat-6.0.14/conf/
...snip...
$ ls apache-tomcat-6.0.14/
LICENSE RELEASE-NOTES bin/ lib/ temp/
work/ NOTICE RUNNING.txt conf/ logs/ webapps/
Set JAVA_HOME environment variable
For Windows users, the Tomcat shell scripts must know the location of the Java installation, and this is done with environment variables. The following command will set the JAVA_HOME environment variable:
{deck}
Make shell scripts executable
For Unix users, the shell scripts in the Tomcat installation are not
executable by default, so in order to execute them, you must set mark them as executable. If you unpacked the Tomcat tar.gz file, the scripts are already executable. The following command will make all shell scripts executable:
{deck:id=unpack tomcat}
{card:label=Unix}{noformat:nopanel=true}
apache-tomcat-6.0.14$ chmod u+x bin/*.sh
Execute the following command to start the Tomcat server:
C:\apache-tomcat-6.0.14\bin>startup.bat Using CATALINA_BASE: C:\apache-tomcat-6.0.14 Using CATALINA_HOME: C:\apache-tomcat-6.0.14 Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp Using JRE_HOME: C:\your\java\installation
{card:label=Unix}{noformat:nopanel=true}
$ cd apache-tomcat-6.0.14/bin
apache-tomcat-6.0.14/bin$ ./startup.sh
Using CATALINA_BASE: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_HOME: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
Using JRE_HOME: /your/java/installation
NOTE: Your output will be different from the example above due to differences in installation location.
Visit http://localhost:8080/ and you should see the Tomcat welcome page.
Shutdown Tomcat by executing the following command:
{card:label=Unix}{noformat:nopanel=true}
apache-tomcat-6.0.14/bin$ ./shutdown.sh
Using CATALINA_BASE: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_HOME: /your/tomcat/installation/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
Using JRE_HOME: /your/java/installation
NOTE: Your output will be different from the example above due to differences in installation locations.