Tomcat Packaging

From trapsink.com
Jump to: navigation, search
Articles in this series


RHEL/CentOS Tomcat 7

Installation Layout

RHEL/CentOS 7 are based on systemd; a 'yum install tomcat' (note no 7 in the names) will install the systemd service unit. This unit, /usr/lib/systemd/system/tomcat.service, calls the shell script /usr/sbin/tomcat-sysd to mimic previous behaviour and read /etc/sysconfig/tomcat. An additional package, tomcat-systemv, can be installed to provide /etc/init.d/tomcat which works the same as RHEL/CentOS 5/6.

Unlike a traditional unpacked archive, the systemd unit and SysVinit script will read two files for variables; the first is a static-named file /etc/tomcat/tomcat.conf for defaults, then a dynamic file /etc/sysconfig/tomcat. The file in sysconfig that will be read is the same name as the script; this allows copying of the /etc/init.d/ (or cloning the systemd unit) and /etc/sysconfig/ files to a new name to run a 2nd, 3rd, etc. instance of Tomcat.

Item Purpose
/usr/lib/systemd/system/tomcat systemd unit used to start/stop Tomcat
/etc/init.d/tomcat SysVinit script used to start/stop Tomcat
/etc/tomcat/tomcat.conf System-wide configuration file for tomcat services
/etc/sysconfig/tomcat Service-specific configuration file for tomcat; exact name loaded matches the unit/init script
/usr/sbin/tomcat Script that somewhat emulates the traditional catalina.sh for starting/stopping Tomcat
/var/run/tomcat.pid PID of the running tomcat java service
/etc/logrotate.d/tomcat Logrotate configuration for catalina.out
/var/log/tomcat/ Logging directory
/usr/share/tomcat/ Main directory that mimics a traditional unpacked archive
/usr/share/tomcat/bin Contains only the bootstrap.jar and tomcat-juli.jar files
/usr/share/tomcat/conf Symlink to /etc/tomcat
/usr/share/tomcat/lib Symlink to /usr/share/java/tomcat
/usr/share/tomcat/logs Symlink to /var/log/tomcat
/usr/share/tomcat/temp Symlink to /var/cache/tomcat/temp
/usr/share/tomcat/webapps Symlink to /var/lib/tomcat/webapps
/usr/share/tomcat/work Symlink to /var/cache/tomcat/work
/usr/share/java/ Main directory containing various .jar (java archive) files
/usr/share/java/tomcat/ Contains classes and resources for Tomcat only


Common Packages

The core packages installed when yum install tomcat takes place; others may be installed as dependencies depending on what's already installed on the system.

Package Summary
apache-commons-collections Provides new interfaces, implementations and utilities for Java Collections
apache-commons-daemon Defines API to support an alternative invocation mechanism
apache-commons-dbcp Apache Commons DataBase Pooling Package
apache-commons-logging Apache Commons Logging
apache-commons-pool Apache Commons Pool Package
avalon-framework Java components interfaces
avalon-logkit Java logging toolkit
ecj Eclipse Compiler for Java
geronimo-jms J2EE JMS v1.1 API
geronimo-jta J2EE JTA v1.1 API
javamail Java Mail API
javapackages-tools Macros and scripts for Java packaging support
jline Java library for reading and editing user input in console applications
log4j Java logging package
python-javapackages Module for handling various files for Java packaging
tomcat Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
tomcat-el-2.2-api Expression Language v1.0 API
tomcat-jsp-2.2-api Apache Tomcat JSP API implementation classes
tomcat-lib Libraries needed to run the Tomcat Web container
tomcat-servlet-3.0-api Apache Tomcat Servlet API implementation classes
xalan-j2 Java XSLT processor
xerces-j2 Java XML parser
xml-commons-apis APIs for DOM, SAX, and JAXP
xml-commons-resolver Resolver subproject of xml-commons


RHEL/CentOS Tomcat 6

Installation Layout

Unlike a traditional unpacked archive, the SysVinit script will read two files for variables; the first is a static-named file /etc/tomcat6/tomcat6.conf for defaults, then a dynamic file /etc/sysconfig/tomcat6. The file in sysconfig that will be read is the same name as the script; this allows copying of the /etc/init.d/ and /etc/sysconfig/ files to a new name to run a 2nd, 3rd, etc. instance of Tomcat.

Item Purpose
/etc/init.d/tomcat6 SysVinit script used to start/stop Tomcat
/etc/tomcat6/tomcat6.conf System-wide configuration file for tomcat6 services
/etc/sysconfig/tomcat6 Service-specific configuration file for tomcat6; exact name loaded matches the init script
/usr/sbin/tomcat6 Script that somewhat emulates the traditional catalina.sh for starting/stopping Tomcat
/var/run/tomcat6.pid PID of the running tomcat6 java service
/etc/logrotate.d/tomcat6 Logrotate configuration for catalina.out
/var/log/tomcat6/ Logging directory
/usr/share/tomcat6/ Main directory that mimics a traditional unpacked archive
/usr/share/tomcat6/bin Contains only the bootstrap.jar and tomcat-juli.jar files
/usr/share/tomcat6/conf Symlink to /etc/tomcat6
/usr/share/tomcat6/lib Symlink to /usr/share/java/tomcat6
/usr/share/tomcat6/logs Symlink to /var/log/tomcat6
/usr/share/tomcat6/temp Symlink to /var/cache/tomcat6/temp
/usr/share/tomcat6/webapps Symlink to /var/lib/tomcat6/webapps
/usr/share/tomcat6/work Symlink to /var/cache/tomcat6/work
/usr/share/java/ Main directory containing various .jar (java archive) files
/usr/share/java/tomcat6/ Contains classes and resources for Tomcat only


Common Packages

The core packages installed when yum install tomcat6 takes place; others may be installed as dependencies depending on what's already installed on the system.

Package Summary
axis A SOAP implementation in Java
classpathx-jaf GNU JavaBeans(tm) Activation Framework
classpathx-mail GNU JavaMail(tm)
ecj Eclipse Compiler for Java
jakarta-commons-collections Provides new interfaces, implementations and utilities for Java Collections
jakarta-commons-daemon Defines API to support an alternative invocation mechanism
jakarta-commons-dbcp Jakarta Commons DataBase Pooling Package
jakarta-commons-discovery Jakarta Commons Discovery
jakarta-commons-httpclient Jakarta Commons HTTPClient implements the client side of HTTP standards
jakarta-commons-logging Jakarta Commons Logging Package
jakarta-commons-pool Jakarta Commons Pool Package
jpackage-utils JPackage utilities
libgcj Java runtime library for gcc
log4j Java logging package
mx4j Open source implementation of JMX Java API
regexp Simple regular expressions API
sinjdoc Documentation generator for Java source code
tomcat6 Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
tomcat6-el-2.1-api Expression Language v1.0 API
tomcat6-jsp-2.1-api Apache Tomcat JSP API implementation classes
tomcat6-lib Libraries needed to run the Tomcat Web container
tomcat6-servlet-2.5-api Apache Tomcat Servlet API implementation classes
wsdl4j Web Services Description Language Toolkit for Java
xml-commons-apis APIs for DOM, SAX, and JAXP
xml-commons-resolver Resolver subproject of xml-commons


RHEL/CentOS Tomcat 5

Installation Layout

Unlike a traditional unpacked archive, the SysVinit script will read two files for variables; the first is a static-named file /etc/tomcat5/tomcat5.conf for defaults, then a dynamic file /etc/sysconfig/tomcat5. The file in sysconfig that will be read is the same name as the script; this allows copying of the /etc/init.d/ and /etc/sysconfig/ files to a new name to run a 2nd, 3rd, etc. instance of Tomcat.

Item Purpose
/etc/init.d/tomcat5 SysVinit script used to start/stop Tomcat
/etc/tomcat5/tomcat5.conf System-wide configuration file for tomcat5 services
/etc/sysconfig/tomcat5 Service-specific configuration file for tomcat5; exact name loaded matches the init script
/usr/sbin/dtomcat5 The traditional catalina.sh for starting/stopping Tomcat renamed
/var/run/tomcat5.pid PID of the running tomcat5 java service
/etc/logrotate.d/tomcat5 Logrotate configuration for catalina.out
/var/log/tomcat5/ Logging directory
/usr/share/tomcat5/ Main directory that mimics a traditional unpacked archive
/usr/share/tomcat5/bin Contains the bootstrap.jar, tomcat-juli.jar and some other basic files
/usr/share/tomcat5/common Symlink to /var/lib/tomcat5/common
/usr/share/tomcat5/conf Symlink to /etc/tomcat5
/usr/share/tomcat5/logs Symlink to /var/log/tomcat5
/usr/share/tomcat5/server Symlink to /var/lib/tomcat5/server
/usr/share/tomcat5/shared Symlink to /var/lib/tomcat5/shared
/usr/share/tomcat5/temp Symlink to /var/cache/tomcat5/temp
/usr/share/tomcat5/webapps Symlink to /var/lib/tomcat5/webapps
/usr/share/tomcat5/work Symlink to /var/cache/tomcat5/work
/usr/share/java/ Main directory containing various .jar (java archive) files
/usr/share/java/tomcat5/ Contains classes and resources for Tomcat only


Common Packages

The core packages installed when yum install tomcat5 takes place; others may be installed as dependencies depending on what's already installed on the system.

Package Summary
ant Ant build tool for java
axis A SOAP implementation in Java
bcel Byte Code Engineering Library
classpathx-jaf GNU JavaBeans(tm) Activation Framework
classpathx-mail GNU JavaMail(tm)
eclipse-ecj Eclipse Compiler for Java
gcc-java Java support for GCC
geronimo-specs Geronimo J2EE server J2EE specifications
gjdoc GNU Javadoc
jakarta-commons-beanutils Jakarta Commons BeanUtils Package
jakarta-commons-collections Jakarta Commons Collections Package
jakarta-commons-daemon Jakarta Commons Daemon Package
jakarta-commons-dbcp Jakarta Commons DataBase Pooling Package
jakarta-commons-digester Jakarta Commons Digester Package
jakarta-commons-discovery Jakarta Commons Discovery
jakarta-commons-el The Jakarta Commons Extension Language
jakarta-commons-fileupload Jakarta Commons Fileupload Package
jakarta-commons-httpclient Jakarta Commons HTTPClient Package
jakarta-commons-launcher The Launcher Component is designed to be a cross platform Java application launcher.
jakarta-commons-logging Jakarta Commons Logging Package
jakarta-commons-modeler Jakarta Commons Modeler Package
jakarta-commons-pool Jakarta Commons Pool Package
jpackage-utils JPackage utilities
ldapjdk The Mozilla LDAP Java SDK
libgcj Java runtime library for gcc
log4j Java logging package
mx4j Open source implementation of JMX Java API
regexp Simple regular expressions API
tomcat5 Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
tomcat5-common-lib Libraries needed to run the Tomcat Web container (part)
tomcat5-jasper Compiler JARs and associated scripts for tomcat5
tomcat5-jsp-2.0-api Jakarta Tomcat Servlet and JSP implementation classes
tomcat5-server-lib Libraries needed to run the Tomcat Web container (part)
tomcat5-servlet-2.4-api Jakarta Tomcat Servlet implementation classes
wsdl4j Web Services Description Language Toolkit for Java
xalan-j2 Java XSLT processor
xerces-j2 Java XML parser
xml-commons Common code for XML projects
xml-commons-apis APIs subproject of xml-commons
xml-commons-resolver Resolver subproject of xml-commons.


Ubuntu Tomcat 7

Installation Layout

Ubuntu does not use a dynamic config based on the init script name, it's single instance only with a basic install. An additional package tomcat7-user contains the tools needed to generate more instances.

Item Purpose
/etc/init.d/tomcat7 SysVinit script used to start/stop Tomcat
/etc/default/tomcat7 System-wide configuration file for init script overrides
/var/run/tomcat7.pid PID of the running tomcat7 java service
/etc/logrotate.d/tomcat7 Logrotate configuration for catalina.out
/usr/share/tomcat7/bin Contains the catalina.sh, bootstrap.jar and other basic files
/usr/share/tomcat7/lib Contains symlinks for all the .jar files to load
/var/lib/tomcat7/common Empty directory structure for classes and resources
/var/lib/tomcat7/conf Symlink to /etc/tomcat7
/var/lib/tomcat7/logs Symlink to ../../log/tomcat7
/var/lib/tomcat7/server Empty directory structure for classes and resources
/var/lib/tomcat7/shared Empty directory structure for classes and resources
/var/lib/tomcat7/webapps Empty directory structure for classes and resources
/var/lib/tomcat7/work Symlink to ../../cache/tomcat7
/var/log/tomcat7/ Logging directory
/usr/share/java/ Main directory containing various .jar (java archive) files


Common Packages

The core packages installed when apt-get install tomcat7 takes place; others may be installed as dependencies depending on what's already installed on the system. This list is without the recommends or suggests packages.

Package Summary
ca-certificates-java Common CA certificates (JKS keystore)
default-jre-headless Standard Java or Java compatible Runtime (headless)
java-common Base of all Java packages
libcommons-collections3-java A set of abstract data type interfaces and implementations
libcommons-dbcp-java Database Connection Pooling Services
libcommons-pool-java pooling implementation for Java objects
libecj-java Eclipse Java compiler (library)
libservlet3.0-java Servlet 3.0 and JSP 2.2 Java API classes
libtomcat7-java Servlet and JSP engine -- core libraries
tomcat7 Servlet and JSP engine
tomcat7-common Servlet and JSP engine -- common files
tzdata-java time zone and daylight-saving time data for use by java runtimes


Ubuntu Tomcat 6

Installation Layout

Ubuntu does not use a dynamic config based on the init script name, it's single instance only with a basic install. An additional package tomcat6-user contains the tools needed to generate more instances.

Item Purpose
/etc/init.d/tomcat6 SysVinit script used to start/stop Tomcat
/etc/default/tomcat6 System-wide configuration file for init script overrides
/var/run/tomcat6.pid PID of the running tomcat6 java service
/etc/logrotate.d/tomcat6 Logrotate configuration for catalina.out
/usr/share/tomcat6/bin Contains the catalina.sh, bootstrap.jar and other basic files
/usr/share/tomcat6/lib Contains symlinks for all the .jar files to load
/var/lib/tomcat6/common Empty directory structure for classes and resources
/var/lib/tomcat6/conf Symlink to /etc/tomcat6
/var/lib/tomcat6/logs Symlink to ../../log/tomcat6
/var/lib/tomcat6/server Empty directory structure for classes and resources
/var/lib/tomcat6/shared Empty directory structure for classes and resources
/var/lib/tomcat6/webapps Empty directory structure for classes and resources
/var/lib/tomcat6/work Symlink to ../../cache/tomcat6
/var/log/tomcat6/ Logging directory
/usr/share/java/ Main directory containing various .jar (java archive) files


Common Packages

The core packages installed when apt-get install tomcat6 takes place; others may be installed as dependencies depending on what's already installed on the system. This list is without the recommends or suggests packages.

Package Summary
ca-certificates-java Common CA certificates (JKS keystore)
default-jre-headless Standard Java or Java compatible Runtime (headless)
java-common Base of all Java packages
libcommons-collections3-java A set of abstract data type interfaces and implementations
libcommons-dbcp-java Database Connection Pooling Services
libcommons-pool-java pooling implementation for Java objects
libecj-java Eclipse Java compiler (library)
libservlet2.5-java Servlet 2.5 and JSP 2.1 Java API classes
libtomcat6-java Servlet and JSP engine -- core libraries
tomcat6 Servlet and JSP engine
tomcat6-common Servlet and JSP engine -- common files
tzdata-java time zone and daylight-saving time data for use by java runtimes