wiki:InstallationTips

Installation Tips

Back to General Installation.

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 Java-7, be sure that no gcj (GNU java) packages are installed:
    dpkg --get-selections |grep gcj
    
    Note: The above search command must return NO packages.
  • Install tomcat:
    aptitude install tomcat6
    
  • Install mysql:
    aptitude install mysql-server
    

Tomcat

  • In Debian add/adjust the following lines in /etc/default/tomcat6:
    • JAVA_HOME=/usr/local/bin/oracle-java-default
    • JAVA_OPTS="-Djava.awt.headless=true -Xms256m -Xmx256M -XX:PermSize=80m -XX:MaxPermSize=80m -XX:+UseConcMarkSweepGC"
  • As always the more memory the better but gnuMims is known to run on the demo at this setting.

Only Debian Lenny (old stable):

  • 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/libmlib_image.so /usr/lib
    • amd64: ln -s /usr/lib/jvm/java-1.5.0-sun/jre/lib/amd64/libmlib_image.so /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 at least 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:
      JkMount /gnuMims/* ajp13_worker
      
      <VirtualHost *:80>
          ServerAdmin contact@example.com
          ServerName gnumims.example.com
      
          #Requests for "/" and "/gnuMims" are redirected to "/gnuMims/"
          #[R] is an external redirect so the url is passed back to the browser.
          RewriteEngine  on
          RewriteRule    ^/$              /gnuMims/       [L,R]
          RewriteRule    ^/gnuMims$       /gnuMims/       [L,R]
      
         JkMount /gnuMims/* ajp13_worker
      
      </VirtualHost>
      
    • To enable libapache2-mod-jk in Debian set these lines in /etc/apache2/mods-available/jk.conf:
      JkWorkersFile   /etc/libapache2-mod-jk/workers.properties
      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/workers.properties:
      workers.tomcat_home=/usr/share/tomcat6
      workers.java_home=/usr/lib/jvm/default-java
      
    • Then run:
      • a2enmod jk
      • /etc/init.d/apache2 restart

MySQL Tips

  • In Debian MySQL only listens on 127.0.0.1 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 = 127.0.0.1

Firewall Tips

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

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

Last modified 9 years ago Last modified on Dec 15, 2014, 5:24:17 PM