Tomcat Installation Guide

Installation differs a bit between Windows and Linux environments. Hopefully most of you you use Linux as a development environment :D

Before you can use use Tomcat you should have at least JRE installed, but JDK is recommended to be used. See the Java installation Guide for that

Step 1:

First you need to obtain the Tomcat package. You can get it from http://tomcat.apache.org.

Note: In Windows environment you should not use the installer version. Use the zipped version instead.

Download the Tomcat core package either in .zip (Windows users) or in .tar.gz (Linux users) format. As far as I know, the current 5.5.23 should work.

Step 2:

Unzip the package to a proper location. The path should not have any spaces in it, because this might bring problems during the build time. Good places are in Windows c:\tomcat and in Linux /usr/local/tomcat. These are the usual places, but you may use different places if you wish, but be sure to do the matching changes in the instructions where needed.

Note also that the downloaded package already includes a folder named apache-tomcat-versionnumber and content of this folder should be the content of your tomcat installation folder.

You may wish to (and is highly recommended to) also create an environmental variable called CATALINA_HOME which points to the Tomcat installation folder. This variable is used by many software and tools to locate the Tomcat installation location.

Step 3:

Next you can test your tomcat installation executing the following command in the console (or promt window):

Windows:

c:\tomcat\bin\catalina.bat

Linux:

/usr/local/tomcat/catalina.sh

Wait for the tomcat to startup. In Windows the above command will open a log window to observe the procedure, in Linux you can use command like

less /usr/local/tomcat/logs/catalina.out

to see the log and then press SHIFT+F to tail the log file. Next point your browser to http://localhost:8080 and verify that you see the Tomcat startup page.

Step 4: only if you are using Tomcat with Jetspeed

To use Tomcat for Jetspeed, you must make few changes to the configuration files.

First, you need to add the user that Jetspeed uses to deploy the portlet-applications. Open a file called tomcat-users.xml under conf folder in Tomcat installation folder (on Linux systems it could be /usr/local/tomcat/conf/tomcat-users.xml). Add the following line between <tomcat-users> tags, likely to the end of the other user definitions:

<user username="j2deployer" password="j2deployer" roles="manager"/>

If you wish to (and again is recommended to) add an admin user to use the built-in Tomcat manager and the addon package Tomcat Administrator, add also the following line to userlist:

<user username="admin" password="admin" roles="admin,manager"/>

You should change the password to your likings (or leave it as it is, if only on a personal development machine).

Installing the administrator package is as simple as was the installing of Tomcat. Download either the Windows package or the Unix/Linux package. Now you should just unzip or untar the contents of the package over the existing tomcat. Note that this package also contains the apache-tomcat-* folder so you may have to copy the contents of that folder manually to the actual location of you Tomcat installation.

That's it. Enjoy.


Development DevelopmentToolsTomcat

  Page Info My Prefs Log in
This page (revision-8) last changed on 18:24 25-Mar-2017 by Mikko Wuokko.
 

Referenced by
How To Install KP...

JSPWiki v2.4.102
[RSS]