Child pages
  • Install Tomcat 7 / 8
Skip to end of metadata
Go to start of metadata
  • Apache Tomcat -
  • Note: Always do a fresh install of Tomcat (please note that Tomcat has a bug. Please use Tomcat 7.0.65 or Tomcat 7.0.68, when released. Addendum 30January2017 - appears to work with 7.0.75 as of this writing. Is known not to work with 7.0.72 through 7.0.74 SAK-31912 - FacesContext already released in JSF tools with Tomcat 7.0.72+ Resolved )
  • 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 7.0.1\
  1. Download Tomcat 7 if you're using Sakai 10-
    Download Tomcat 8 if you're using Sakai 11 -
    (The directions below are mostly the same for 7 or 8, but the is a little different)

    • 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

      If you're running the tag of Sakai 2.9.1 or earlier you need to be running Tomcat 7.0.21 or earlier. If you go any higher Webdav and Sitestats will have errors and not work. A better solution is to upgrade to the latest version of Sakai and Tomcat.
      SAK-28531 - Sitestats does not load with Tomcat 7.0.35 Closed
      SAK-23156 - IncompatibleClassChangeError from WebDAV LOCK operations giving 500 response code Closed
  2. Extract to /opt (symlink the apache-tomcat-7.0.x directory to tomcat after extracting)
    • Example (assuming you have saved the file as /opt/apache-tomcat-7.0.x.tar.gz)

    • Windows users should just rename the directory since they cannot symlink
  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.7+)

    Populate Database With Demo Data

    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 7 Mac/Linux
      Tomcat 8 Mac/Linux
    2. Windows(PC): Create a file called setenv.bat with the following:

      Tomcat 7 Windows
      Tomcat 8 Windows
  7. [OPTIONAL] Delete the default webapps from the webapps dir

    rm -rf webapps/*

Configure tomcat 7/8 to use the old tomcat 5.5 classloader dirs, this is not needed for the master branch of Sakai and Sakai 11.

  1. Edit conf/
    1. Add the following to the line that begins with "common.loader=..."

      • Tomcat 7

      • Tomcat 8

    2. Add the following to the line that begins with "server.loader=..."

    3. Add the following to the line that begins with "shared.loader=..."

  2. Create the directories

    mkdir -p shared/classes shared/lib common/classes common/lib server/classes server/lib

Improve startup speed

You can improve startup speed under both Tomcat 7 and Tomcat 8 significantly.

Tomcat 7

Edit the file conf/ and add the property to the bottom


Tomcat 8

Edit the file conf/context.xml and add this JarScanFilter block to the context


  • No labels


  1. Is configuring Tomcat7 for the old Tomcat5.5 classloader dir structure still required for Sakai2.9 installs, or is this just to get Sakai2.7 working with Tomcat7?

  2. It's still required at the moment for 2.9. We discussed on some of the lists changing the deployment scripts either dumping it into the same lib, or everything into a different lib (like /sakai/lib, which would still require modification). Neither of these are done and ready for 2.10 though.

  3. What's the difference between step 2 and step 3, seems just the same.

    And Step 9-iii is not needed. Sakai doesn't use server.loader

  4. Hi Utibe, 


    I am going to delete your comment. 

    This area is for comments about the documentation. Support questions should go to or . To subscribe send an email to or . If you have problems subscribing please email me at sakaicoordinator at .