File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Installation Guide (Tomcat on Linux) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Installation Guide (Tomcat on Linux)" Watch "Installation Guide (Tomcat on Linux)" New topic

Installation Guide (Tomcat on Linux)

pinga kanave

Joined: Mar 11, 2010
Posts: 20
Hi guys , Thank you very much for your help and support throughout the installation.

I think this is a time to pay a little contribution to all the forum members.

Installing a Tomcat on windows box is not a difficult task but when it comes to linux Its very difficult to setup.

Request you to suggest any modifications if required.Later after all the modifications are done this will serve as a guide for newbies like me.

I m going to Post my experience in installing TOMCAT on linux.

Your comments are highly appreciated.

OS : Oracle Enterprise Linux 5.2 32bit
Step1: Install Tomcat, JDK, JRE

We are going to install following softwares in the newly created machines.

Make a folder named install in /.
Copy all the required softwares in /install.


Installation Guide:


I have choosen linux version of tomcat.
For Initial Setup You should always go for
Core version download.
downloaded apache-tomcat-5.5.29.tar.gz

This will create a new folder as apache-tomcat-5.5.29 in same directory.
go to apache-tomcat-5.5.29/bin

it will not run as java new version is not yet installed.

2) jdk-6u20-linux-i586-rpm.bin:
Next we will install latest jdk version.

This will create a new folder in

use it for JAVA_HOME.

3) jre-6u20-linux-i586-rpm.bin
Next we will install latest jre version.

This will create a new folder in
use it for JRE_HOME.

Step2:Configure java and TOMCAT

# javac -version
javac 1.6.0_20
# java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

######At this time java is set to default java in linux our aim is to change it to latest java version.
for setting up this you need root login therefore type

######Then you type

######Finally you type

........ and choose '2'nd option.

Now make sure you disable firewall .

Disable the firewall

I have created a script called Tomcat and pasted following content inside it.(All credit goes to original script writer)

Edit the lines that start with tomcat and export to match

Save the script with name “tomcat” to a location “/etc/init.d”

(at least on most newer releases since /etc/init.d is a standard now). Then you have to allow execute access to the script, so run:

Add to appropriate run level directories

The easy way to do this is to just simply run:

Add username/Password for tomcat manager:
How to add a new user name to tomcat manager:

just add line number 3 and 6 to /install/apache-tomcat-5.5.29/conf/tomcat-users.xml
1) <?xml version='1.0' encoding='utf-8'?>
2) <tomcat-users>
3) <role rolename="manager"/>
4) <role rolename="tomcat"/>
5) <role rolename="role1"/>
6) <user username="manager" password="tomcat" roles="manager,tomcat"/>
7) <user username="tomcat" password="tomcat" roles="tomcat"/>
8) <user username="both" password="tomcat" roles="tomcat,role1"/>
9) <user username="role1" password="tomcat" roles="role1"/>
10) </tomcat-users>

Restart tomcat server.
By using service tomcat restart.

If anybody faces any issue just PM me .I will try to help as soon as possible.

I agree. Here's the link:
subject: Installation Guide (Tomcat on Linux)
It's not a secret anymore!