Installing Apache Tomcat on Red Hat Linux not using YUM

Posted on 10-01-2013 14:04 by graham
This tutorial shows how to install Apache Tomcat server on Linux. It does not use yum. Instead, it installs Tomcat from a binary package. The advantage of this approach is that you can pick the release you want, whereas yum would make the choice for you, not always picking the latest version.

Download the latest Tomcat release

Go to the directory /opt:
cd /opt

From the Apache Tomcat homepage <link><link> choose the latest release, or any other release you are interested in. Copy the URL of the tar package and download it using wget:

Unzip the tar package to the current directory:
tar xvf apache-tomcat-6.0.36.tar.gz

A folder called apache-tomcat-6.0.36 will be created. Rename it to tomcat:
mv apache-tomcat-6.0.36 tomcat

Create a tomcat user group

Create a user group to which the tomcat user will belong:
useradd -g 91 -s /sbin/nologin -d /opt/tomcat/temp tomcat

Create a tomcat user

Create a user with the name tomcat that will be the owner the server process:
useradd -g 91 -s /sbin/nologin -d /opt/tomcat/temp tomcat

NOTE: The user may already exist. If such case nothing will happen and you will see a message saying that there already is such user.

Now, make tomcat the owner of all the Tomcat files:
chown -R tomcat:tomcat tomcat

Start the server

Your installation is now complete. To start the server, run:

Check that the server is running

After a few second the server should start. You can track the start up by viewing the log file /opt/tomcat/logs/catalina.out. The server is ready to use when the following line appears:
INFO: Server startup in 30118 ms

Now you can test the connection using telnet:
telnet localhost 8080

and when the prompt appears, type:

As a response, you should be flooded with HTML representing Tomcat's home page.


Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems