1. Download Tomcat 8 - https://tomcat.apache.org/download-80.cgi

  2. Extract to /opt (symlink the apache-tomcat-8.0.x directory to tomcat after extracting)
  3. Modify conf/server.xml for international character support
    1. Add URIEncoding="UTF-8" to the Connector element
      • <Connector port="8080" URIEncoding="UTF-8" ...
  4. Set environment variable: CATALINA_HOME=/opt/tomcat
  5. Add $CATALINA_HOME/bin to PATH
  6. Setup the SETENV file in the tomcat/bin directory with JAVA_OPTS (from Install Java 1.8).

    Instead of starting with an empty database you can add the flag -Dsakai.demo=true in addition to the others shown here. During your first Tomcat launch it will populate your database with test data (students, courses, etc). Once the data has been created remove this flag for subsequent Tomcat launches. Be advised that this flag will not trigger on a database with data already in it so you must make this choice during the initial setup. It should also be noted that without this flag one will not be able to create any course sites in Sakai unless Academic Term, Subject, Course, and Section data is manually added to the "cm_" tables in the database.

    We recommend using -Djava.util.Arrays.useLegacyMergeSort=true until this issue can be resolved - 

     

    1. Mac/Linux: Create a file called setenv.sh with the following (alternately, you can put this into your .bashrc file so they're automatically executed):

      export JAVA_OPTS="-server -d64 -Xms1g -Xmx2g -Djava.awt.headless=true -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC”
      JAVA_OPTS=“$JAVA_OPTS -Dhttp.agent=Sakai”
      JAVA_OPTS=“$JAVA_OPTS -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false”
      JAVA_OPTS=“$JAVA_OPTS -Dsakai.security=$CATALINA_HOME/sakai/”
      JAVA_OPTS=“$JAVA_OPTS -Duser.timezone=US/Eastern”
      JAVA_OPTS=“$JAVA_OPTS -Dsakai.cookieName=SAKAI2SESSIONID”
      JAVA_OPTS=“$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false”
      
      
      
      
    2. Windows(PC): Create a file called setenv.bat with the following:

      set JAVA_OPTS=-server -Xmx1028m -XX:MaxMetaspaceSize=512m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dhttp.agent=Sakai -Djava.util.Arrays.useLegacyMergeSort=true -Dfile.encoding=UTF8
  7. [OPTIONAL] Delete the default webapps from the webapps dir

    rm -rf webapps/*
    
Improve startup speed

You can improve startup speed under Tomcat 8 significantly.

For Sakai 12 and earlier: Edit the file conf/context.xml and add this JarScanFilter block to the <Context>

       <JarScanner>
        <!-- This is to speedup startup so that tomcat doesn't scan as much -->
        <JarScanFilter defaultPluggabilityScan="false"
defaultTldScan="false"
tldScan="jsf-impl-*.jar,jsf-widgets-*.jar,myfaces-impl-*.jar,pluto-taglib-*.jar,sakai-sections-app-util-*.jar,spring-webmvc-*.jar,standard-*.jar,tomahawk*.jar,tomahawk-*.jar"/>
    </JarScanner>

 

For Sakai 19 and later: After the JSF 2.3 migration, users may update the tomcat configuration to this one:

       <JarScanner>
        <!-- This is to speedup startup so that tomcat doesn't scan as much -->
        <JarScanFilter defaultPluggabilityScan="false"
defaultTldScan="false"
tldScan="jsf2-widgets-*.jar,javax.faces-*.jar,jsf-impl-*.jar,jsf-widgets-*.jar,myfaces-impl-*.jar,pluto-taglib-*.jar,sakai-sections-app-util-*.jar,spring-webmvc-*.jar,standard-*.jar,tomahawk*.jar,tomahawk-*.jar"/>
    </JarScanner>