Child pages
  • Sakai 20 Install Guide (Source)

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


export MAVEN_OPTS='-Xms512m -Xmx1024m'

1.4 Install Tomcat



  • Apache Tomcat -
  • Note: Always do a fresh install of Tomcat 9
  • Note: Windows users should ensure that there are no spaces in the complete tomcat path as this causes errors with JSF tools in Sakai
    GOOD: C:\opt\tomcat\, C:\sakaistuff\installs\tomcat\
    BAD: C:\program files\tomcat\, C:\opt\apache tomcat 9.0.19\
  1. Download Tomcat 9 -

    • Windows users should get the zip file instead of installing a service
      It makes viewing the tomcat logs easier and it is easier to configure

  2. Extract to /opt (symlink the apache-tomcat-89.0.x directory to tomcat after extracting)
    • Example (assuming you have saved the file as /opt/apache-tomcat-9.0.x.tar.gz)

      cd /opt
      tar xzvf apache-tomcat-9.0.x.tar.gz
      ln -nsf apache-tomcat-9.0.x tomcat

    • Windows users should either rename the directory or, if comfortable, create a directory junction using an elevated cmd prompt:

      mklink /J C:\apache-tomcat-9.0.x C:\tomcat

  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.

  7. You can populate the database with Demo data or use the quartz job Create Test Sites (Not recommended for production environments)

    1. Using the quartz job will create some sample sites with some sample data in tools ideal for testing
    2. Another alternative 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.

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

        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 -Duser.timezone=US/Eastern"
        JAVA_OPTS="$JAVA_OPTS -Dsakai.cookieName=SAKAI2SESSIONID"

      2. Windows(PC): Create a file called setenv.bat with the following:
        Tomcat 8 9 Windows

        set JAVA_OPTS=-server -Xmx1028m -XX:MaxMetaspaceSize=512m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dhttp.agent=Sakai -Djava.util.Arrays.useLegacyMergeSort=true -Dfile.encoding=UTF8

  8. [OPTIONAL] Delete the default webapps from the webapps dir

    rm -rf webapps/*


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>