Version 6 (modified by Gavin, 11 years ago) (diff)


Installation Tips

Back to General Installation.

A server with Tomcat and a Java servlet can be a tricky thing to setup.
If you are not experienced with these things please contact us for help!
By all means have a go if you are keen but contact us well BEFORE severe hair loss occurs ;-)
We would rather help than have you give up and miss out on a great application.

Debian GNU/Linux

We highly recommend using Debian stable as the host operating system.
It is a free, stable, powerful and very widely used operating system for servers.
All our testing and configuration is done against Debian servers.

  • Install sun-java5, be sure that no gcj (GNU java) packages are installed:
    dpkg --get-selections |grep gcj
    Note: The above search command must return NO packages.
    aptitude install sun-java5-jdk
  • Install tomcat:
    aptitude install tomcat5.5
  • Install mysql:
    aptitude install mysql-server


  • In Debian add/adjust the following lines in /etc/default/tomcat5.5:
    • JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
    • JAVA_OPTS="-Djava.awt.headless=true -Xmx256M"
  • To work around a java.lang.UnsatisfiedLinkError in Debian Lenny run the following commands:
    • i386: ln -s /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/ /usr/lib
    • amd64: ln -s /usr/lib/jvm/java-1.5.0-sun/jre/lib/amd64/ /usr/lib
    • both: ldconfig
  • Note:

Memory Tips

  • GnuMims has been known to load and run on a 300Mhz laptop with <180MB total RAM but would not be very usable.
  • A Debian GNU/Linux machine with 1GB RAM and P4 equivalent processor is recommended.
  • For a Windows 2003 server directly running tomcat you may need more than 2G of RAM (that's why we recommend a dedicated Debian GNU/Linux)
  • A vmware virtual appliance (GNU/Linux + Tomcat + Mysql) with 1G of RAM should work ok on a Windows 2003 server if you must run Windows.

Apache2 Setup Tips

  • It is common (but not required) to have Tomcat run through Apache.
    • This is an apache example config using libapache2-mod-jk:
      Alias /gnuMims /var/lib/tomcat5.5/webapps/gnuMims
      <Directory /var/lib/tomcat5.5/webapps/gnuMims/>
          Options FollowSymLinks Indexes MultiViews
          AllowOverride None
          order allow,deny
          allow from all
      JkMount /gnuMims/* ajp13_worker
    • To enable libapache2-mod-jk in Debian set these lines in /etc/apache2/mods-available/jk.conf:
      JkWorkersFile   /etc/libapache2-mod-jk/
      JkLogFile       /var/log/apache2/mod_jk.log
      JkLogLevel      info
      JkMount /*.jsp ajp13_worker
      JkMount /*/servlet/ ajp13_worker
    • To configure mod-jk in Debian double check these lines in /etc/libapache2-mod-jk/
    • Then run:
      • a2enmod jk
      • /etc/init.d/apache2 restart

MySQL Tips

  • In Debian MySQL only listens on out of the box.
  • ONLY if you need to access mysql from outside, then comment this line out in /etc/mysql/my.cnf:
    • #bind-address =

Firewall Tips

  • Every server must have a firewall, we use shorewall firewall.
  • Ports of interest - http:80, https:443, Tomcat(Debian):8180, MySQL:3306.

One again contact us if any of this does not work for you