Download and Install Tomcat on CentOS

This section provides a tutorial example on how to install Tomcat server on a local CentOS system. It requires OpenJDK.

If you want to learn JSP (JavaServer Page) technology, you should download and install Apache Tomcat on your local machine, so that you can use it test your JSP pages. Here is what I did to download and install Apache Tomcat on my CentOS local computer.

1. Login as "root" to avoid permission problems.

2. Verify that OpenJDK 8 JRE and JDK packages are installed:

# java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK Server VM (build 25.232-b09, mixed mode)

# javac -version
javac 1.8.0_232

3. Install Tomcat with "yum" package tool. It will download the latest version of the correct binary package automatically.

# yum install tomcat:

  tomcat.noarch 0:7.0.96-1.el6

Dependency Installed:
  ecj.i686 1:4.5.2-3.el6
  jakarta-commons-daemon.i686 1:1.0.1-8.9.el6
  java-1.5.0-gcj.i686 0:
  java_cup.i686 1:0.10k-5.el6
  libgcj.i686 0:4.4.7-23.el6
  sinjdoc.i686 0:0.5-9.1.el6
  tomcat-el-2.2-api.noarch 0:7.0.96-1.el6
  tomcat-jsp-2.2-api.noarch 0:7.0.96-1.el6
  tomcat-lib.noarch 0:7.0.96-1.el6
  tomcat-servlet-3.0-api.noarch 0:7.0.96-1.el6


4. Verify Tomcat installation:

# which tomcat

# tomcat version
Server version: Apache Tomcat/7.0.96
Server built:   Sep 26 2019 18:42:39 UTC
Server number:
OS Name:        Linux
OS Version:     2.6.32-696.20.1.el6.i686
Architecture:   i386
JVM Version:    1.8.0_232-b09
JVM Vendor:     Oracle Corporation

I think my Tomcat 7 installation is completed now. See the next tutorial on how to start the Tomcat server properly.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

Using Tomcat on CentOS Systems

Download and Install Tomcat on CentOS

 Start/Stop Tomcat Server on CentOS

 My First HTML Page on CentOS

 My First JSP Page on CentOS

 My First Servlet Page on CentOS

 Using Tomcat on macOS Systems

 Connecting to SQL Server from Servlet

 Developing Web Applications with Servlet

 Archived Tutorials


 Full Version in PDF/EPUB