Playing with Apache TomCat

Apache Tomcat, often referred to simply as Tomcat, should not be confused with the Apache web server. While they are frequently used together, they are separate entities. Apache Tomcat is an open-source servlet container developed by the Apache Software Foundation, implementing the Java Servlet and JSP specifications to provide a "pure Java" HTTP web server environment for Java applications.

Installing Apache Tomcat on Linux

First, download the latest stable version of the JDK. For this guide, we will use JDK 7.

Installing Java SE Development Kit 7

Download JDK 7:

[root@centos garbage]# wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.rpm

Install JDK 7:

[root@centos garbage]# rpm -ivh jdk-7-linux-i586.rpm

Verify the installation:

[root@centos garbage]# java
[root@centos garbage]# java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

Downloading & Installing Tomcat

The latest stable release at the time of writing is Tomcat 7.0.21.

Download Tomcat:

[root@centos garbage]# wget http://www.apache.org/dist/tomcat/tomcat-7/v7.0.21/bin/apache-tomcat-7.0.21.tar.gz

Extract Tomcat:

[root@centos garbage]# tar vxzf apache-tomcat-7.0.21.tar.gz
[root@centos garbage]# cd apache-tomcat-7.0.21

Using Tomcat

[root@centos apache-tomcat-7.0.21]# cd bin

Starting Tomcat:

[root@centos bin]# ./startup.sh

Stopping Tomcat:

[root@centos bin]# ./shutdown.sh

Now, point your web browser to:

http://yoursitename:8080

You should see the Tomcat Administration page.

To add or remove users, navigate to the "conf" directory within the Apache Tomcat directory and edit the necessary user configurations by adding or modifying the following line as needed:

<user name="desired_Username" password="desired_passwd" roles="admin,manager,tomcat"/>

Comments

Popular posts from this blog

Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Using a Self signed Certificate to Run Apache2 under SSL

IPS (Image Packaging system) in Solaris 10