Author: Cristhian Nunez
Date 2007-06-05
Overview
Apache Tomcat is a web container developed at the Apache Software Foundation (ASF). Tomcat implements the servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, providing an environment for Java code to run in cooperation with a web server. It adds tools for configuration and management but can also be configured by editing configuration files that are normally XML-formatted. Tomcat includes its own internal HTTP server.
Features
Implements the Servlet 2.4 and JSP 2.0 specifications
Reduced garbage collection, improved performance and scalability
Native Windows and Unix wrappers for platform integration
Faster JSP parsing
Requirements
Apache 2.0
Java Development Kit (JDK)
Implementation
Download and install apache tomcat from http://tomcat.apache.org/
Unzip the package and copy under /usr/local/tomcat/
Set $JAVA_HOME and $CLASSPATH.
export JAVA_HOME=”path-to-jdk”
export CLASSPATH=/usr/local/tomcat/common/lib/jsp-api.jar:/usr/local/tomcat/common/lib/servlet-api.jar
Rename server.xml. mv /usr/local/tomcat/conf/server.xml.orig /usr/local/tomcat/conf/server.xml
Change the default port number
We can change the default port number in /usr/local/tomcat/conf/server.xml
Find the lines:
Code:
maxThreads="150" minSpareThreads="25" ...
Change it to the port desired.
Turn on Servlet reloading. Edit /usr/local/tomcat/conf/context.xml
Find:
Code:
Change It to:
Enable Invoker Servlet. Edit /usr/local/tomcat/conf/web.xml
Find and uncomment (remove the <-- and --> wrapped around the tags):
Code:
org.apache.catalina.servlets.InvokerServlet
...
Also find and uncomment:
Code:
Create Link to start and shutdown tomcat automatically in each server restart
ln -s /usr/local/tomcat/bin/startup.sh /etc/rc5.d/S99tomcat
ln -s /usr/local/tomcat/bin/shutdown.sh /etc/rc5.d/K99tomcat
Finally, start tomcat
/usr/local/tomcat/bin/startup.sh
No hay comentarios.:
Publicar un comentario