Search code examples
apacheamazon-ec2mod-jk

Discovering dependencies of mod_jk


We are running a large amount of old EC2 instances which are based on Amazon Linux AMI 2014.09, a pretty old version.

We have recently built mod_jk on one of them that so that we can front Tomcat with Apache Web server 2.4.

We are in the process of identifying the dependencies of this mod_jk module. Can we re-use the mod_jk.so library that we just built with newer versions of the OS? We are running a large number of instances, so we would like to cut out the whole "building binaries from sources" step, so our ideal setup would be to take the current mod_jk.so binary and deploy it in all other EC2 instances.

The question is: can we safely do it? If not, when do we need to rebuild it? For example:

  1. Do we need to rebuild it if we decide to launch EC2 instances with the latest Amazon Linux AMI, which is 3 years newer?

  2. Do we need to rebuild it if the Apache's version is different?

Thank you in advance, Meletis


Solution

  • I have a couple of precompiled mod_jk's in order to avoid just this cases. As per my own experience, I must recompile it in this scenarios:

    1. Different Apache version (2.2/2.4)
    2. Apache 32/64bits

    As I stated before, according to this, you should have no more than 4 built mod_jk binaries to choose the right one from.

    I could not tell you wether this is a best practice (probably not), but I have use this already built mod_jk in different Linux distributions and versions of Fedora, CentOS, Red Hat and Debian.