[an error occurred while processing this directive] Install Apache2, Sun Java 1.5, Mod JK, and Tomcat5 on Debian Sarge
Tomcat5 on Debian Sarge @ thaemlitz.com
[an error occurred while processing this directive]
[an error occurred while processing this directive]

this is the step by step execution on how to get apache2 working with tomcat5 on debian sarge (as of 07/20/2006). apache will be connecting via mod_jk to tomcat which are both running on sun's java 1.5.

this is not realy a tutorial, it's how to install in the debian way after your done reading other peoples tutorials. it convers how apt-get should be configured and which packages need to be updated/installed.

Sun Java 1.5 install

  1. check configuration of /etc/apt/sources.list for java-package

    • deb ftp://ftp.us.debian.org/debian/ unstable main contrib non-free
    • deb ftp://ftp.us.debian.org/debian/ testing main contrib

  2. upgrade initrd-tools to prevent kernel removal from libc6 upgrade. see prevent libc6 upgrade problems for details. [be sure to specify 'testing'].

    • apt-get install initrd-tools/testing

  3. upgrade initrd-tools to prevent kernel removal from libc6 upgrade. [be sure to specify 'testing'].

    • apt-get install initrd-tools/testing
    now upgrade libc6 and friends [be sure to specify 'unstable'].
    • apt-get install libncurses5/unstable
    • apt-get install libc6/unstable
    • apt-get install libreadline5/unstable

  4. finally install sun's java (i use the fonts for pdf's)

    • apt-get install sun-java5-jdk sun-java5-fonts

  5. i added JAVA_HOME to the default profile (whoopie)

    • vi /etc/profile
      export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"
  6. java 1.5 is now installed and configured in "the debian way".

    • source /etc/profile
    • java -version

Apache2 install

  1. everything should install this easy, but we want Java 1.5 and TomCat5 so it's hardish.

    • apt-get install apache2

TomCat5 install

  1. install TomCat5 and friends (more details)

    • apt-get install tomcat5 tomcat5-webapps tomcat5-admin apache-utils
    you can check the install on port 8180 (not 8080)

Mod_Jk install

  1. be sure it install mod_jk not mod_jk2 as it is depricated

    • apt-get install libapache2-mod-jk
    now configure mod_jk
    • vi /etc/libapache2-mod-jk/workers.properties
      workers.tomcat_home=/usr/share/tomcat5
      workers.java_home=/usr/lib/jvm/java-1.5.0-sun
    • cd /etc/apache2
    • cp /usr/share/doc/libapache2-mod-jk/httpd_example_apache2.conf mods-available/jk.conf
    • ln -s /etc/apache2/mods-available/jk.conf mods-enabled/jk.conf
    • /etc/init.d/apache2 restart

if you have suggestions or comments, feel free to post them in our guest book.

[an error occurred while processing this directive]