The instructions in the official documentation at Administration - installation - WAR - Tomcat do not work on Debian Lenny. Follow the steps below to install Magnolia on Tomcat running on Debian.

Deploy WAR

To deploy the .war file:

  1. Stop Tomcat.
  2. Edit .../init.d/tomcat5.5 by:
    • Turning off Tomcat security. If you omit this step Magnolia will not deploy. Find TOMCAT6_SECURITY=yes in the file and replace it with TOMCAT_SECURITY=no.
    • Adapting the JVM Heap size to at least 512MB (e.g. JAVA_OPTS="-Xms512m -Xmx512m"). Find the following:
      if [ -z "$JAVA_OPTS" ]; then
          JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
      fi
      
      And replace it with:
      if [ -z "$JAVA_OPTS" ]; then
          JAVA_OPTS="-Djava.awt.headless=true -Xmx512M -Xms512M"
      fi
      

3 Copy the Magnolia .war file into the Tomcat /webapps folder. In the standard setup this is at /usr/share/tomcat6.X/webapps/.
4 Restart Tomcat and wait for the process to complete, i.e. until Tomcat completely restarted.

Remove .war file and restart Tomcat

  1. Stop Tomcat.
  2. Remove the Magnolia .war file from the Tomcat /webapps, but do not touch the extracted Magnolia Tomcat /webapps folder.
  3. Restart Tomcat.

Launch Magnolia

  1. To complete the setup, launch Magnolia AdminCentral, by pointing your browser to e.g http://localhost:8080/magnoliaAuthor.
  2. After WAR deployment you can reset default heap size that was changed in #DeployWAR above.

Please also see Too many open files issue if you are running Magnolia on Linux with a file-based database.

1 Comment

  1. I have test it with Ubuntu Server 9.04 and Tomcat 6.x and it works perfectly excepts for some little differences:
    1) obviusly instead off:

    • "/etc/init.d/tomcat5.5" > "/etc/init.d/tomcat6"
    • "TOMCAT5_SECURITY" > "TOMCAT6_SECURITY"

    2) I have to copy the Magnolia .war file into "/var/lib/tomcat6/webapps/" (I also have a "/usr/share/tomcat6/webapps/" folder but I test copying there the .war file and it didn't works)
    3) I can launch Magnolia AdminCentral with "http://localhost:8080/magnolia" because before restart Tomcat I have renamed the Magnolia .war file to "magnolia.war"

    Also hope this will help someone.

    (Sorry for my english, I am spanish)