Introduction

Tomcat8 package is yet currently available for Ubuntu 14.04. However, we can set up Tomcat8.0.32 on Ubuntu 14.04 by using the package for Tomcat 16.

A Tomcat8 package consists of the following packages:

  • authbind
  • libcommons-collections3-java
  • libcommons-dhcp-java
  • libcommons-pool-java
  • libecj-java
  • libtomcat8-java
  • tomcat8
  • tomcat8-common

Steps:

  • Install Tomcat8.0.32 on a Ubuntu 16 box
  • Inspect the contents of the package

dpkg -c ./path/to/tomcat8_8.0.32-1ubuntu1.3_all.deb

The path showed will be a reference of file structure of a Tomcat 8 installation which we will need to mimic in the Ubuntu 14.04 box

  • Download Tomcat8.0.32 package for Ubuntu 16
  • Extract files from the Debian package:

ar -x tomcat8_8.0.32-1ubuntu1.3_all.deb

  • Extract files from data.tar.gz using tar

tar -xf data.tar.gz

  • The above will produce usr, etc and var folders
  • Move the folders above into /usr, /etc and /var respectively
  • Do the same for libtomcat8-java and tomcat8-common packages
  • Apt-get install the rest of the required packages:

– authbind

– libcommons-collections3-java

– libcommons-dbcp-java

– libcommons-pool-java

– libecj-java

Note: if you are getting dependency issue during the install of libecj-java, fix with “apt-get install -f

  • Create tomcat8 user

groupadd tomcat8

useradd -s /bin/false -g tomcat8 -d /usr/share/tomcat8 tomcat8

  • /usr/share/tomcat8/lib contains symlinks to /usr/share/java/tomcat8 which are extracts from libtomcat8-java
  • Fix file permissions and ownership in /usr, /etc, /var. Some will require ownership of root:tomcat8