1.0 Install Prerequisites
...
1.0 Install Prerequisites
To begin with the following items must be installed (you may skip any you all ready have installed).
- Java 1.811
- GitGIT
- Maven 3.0 8 or later
- Tomcat 9
Sakai 2022.0 was QA tested with Java 1.8.0_252, maven 3.5. (though maven-3.3.9 should also work), Apache with Java 11.0.16.1 (Temurin), Maven 3.8.4, Tomcat 9.0.1969
1.1 Verify/Install Java
...
11
Oracle's
...
...
JDK 11, a.k.a Java
...
11, is the required version to use with
...
Sakai 22.
To confirm that Java is both installed on your system and is the correct version for Sakai, run java -version
from the command line:
java -version
If Java is installed, basic version and build information will be displayed. Example output:
openjdkjava version "111.0.816.0_252"
OpenJDK1" 2022-08-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 111.0.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK16.1+1-LTS-1)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 25.252-b0911.0.16.1+1-LTS-1, mixed mode)
1.1.1 Set Java environment variables
...
Variable | Unix | Mac | Windows |
---|---|---|---|
JAVA_HOME |
|
|
|
PATH |
|
|
|
Windows: append the string to the end of the Path
system variable
...
We recommend that you define these settings in Tomcat's /bin
directory in a file named setenv.sh
(Unix/Mac) or setenv.bat
(Windows). See the "Install Tomcat 89" section below for more details.
...
You can define the default language/locale when starting Sakai by setting the system properties -Duser.language
and -Duser.region
. For information on supported languages see the release notes or visit the i18N Work Group space.
-Duser.language=ptes -Duser.region=PT
...
ES
Specify an HTTP Proxy (optional)
...
It is recommended to use Maven 3.58+.
You can download Maven at
...
Extract the distribution archive into your installation directory of choice, e.g. /usr/local/apache-maven-3.28.27
. Confirm that you have installed the correct version of Maven and can start it by issuing mvn --version
from the terminal. At this point your environment is prepared to build and deploy the Sakai source code.
mvn --version
Apache Maven 3.8.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T14:33:14-04:003599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /usr/share/D:\opt\maven3
Java version: 111.0.816.0_2521, vendor: PrivateOracle BuildCorporation, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jreD:\opt\java11
Default locale: enes_USES, platform encoding: UTF-8Cp1252
OS name: "linuxwindows 10", version: "410.15.0-65-generic", arch: "amd64", family: "unixwindows"
1.3.1 Set Maven environment variables
...
Variable | Unix/Mac | Windows |
---|---|---|
MAVEN_HOME |
|
|
PATH |
|
|
Windows: append string to the end of the Path
system variable
...
1.4 Install Tomcat 9
- Apache Tomcat - httphttps://tomcat.apache.org/download-90.cgi
- 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.1971\
- Download Tomcat 9 - https://tomcat.apache.org/download-90.cgi
Windows users should get the zip file instead of installing a service
It could install the tomcat9 service, it makes viewing the tomcat logs easier and it is easier to configure.
- Extract to /opt (symlink the apache-tomcat-9.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
- Modify conf/server.xml for international character support
- Add URIEncoding="UTF-8" to the Connector element
- <Connector port="8080" URIEncoding="UTF-8" ...
- Add URIEncoding="UTF-8" to the Connector element
- Set environment variable: CATALINA_HOME=/opt/tomcat
- Add $CATALINA_HOME/bin to PATH
Setup the SETENV file in the tomcat/bin directory with JAVA_OPTS.
You can populate the database with Demo data or use the quartz job Create Test Sites (Not recommended for production environments)
- Using the quartz job will create some sample sites with some sample data in tools ideal for testing
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.
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):
Tomcat 9 Mac/Linuxexport 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 -
Djava.util.Arrays.useLegacyMergeSort=
true
"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"
Windows(PC): Create a file called setenv.bat with the following:
Tomcat 9 Windowsset 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
[OPTIONAL] Delete the default webapps from the webapps dir
rm -rf webapps/*
Improve startup speed
You can improve startup speed under Tomcat 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>
...
webapps/*
Improve startup speed
You can improve startup speed under Tomcat significantly editing the file conf/context.xml and add this JarScanFilter block to the <Context>
|
...
Sakai source code can be checked forked from our Github repository. The latest development work is located in the master branch
; stable releases can be found in tags
while maintenance and other work is performed in a 20.x branch.
...
22 release tag
To checkout a stable release tag, clone the git repo and then checkout the tag (in this case 20.0):
git clone https://github.com/sakaiproject/sakai.git cd sakai && git checkout 2022.02
Release Infomation
The latest stable release may be newer than the version listed above. Please see https://github.com/sakaiproject/sakai/releases.
...
22.x maintenance branch
The latest bug fixes for a particular release can be found in our maintenance branches. Please note that certain maintenance branch fixes require database schema changes. You can check out the maintenance branch by issuing the following command from the terminal:
git clone https://github.com/sakaiproject/sakai.git cd sakai && git checkout 2022.x
If you all ready have cloned the repository, skip step the clone step above.
...
If you need to override the default settings you must create your own sakai.properties
file either from scratch or from a known working copy adding new key/value settings in order to customize your installation. We recommend that you review the default.sakai.properties
file included in the source installation or in the appropriate maintenance branch.
Version | default | |
---|---|---|
11 | default.sakai.properties | |
10 | 22.0 | default.sakai.properties |
2.9 | default.sakai.properties |
The default location for your local sakai.properties
file is $CATALINA_HOME/sakai
. This folder is not created by Maven during the build and deployment process, so you will have to create it manually or via a script. You can also store Sakai's configuration files outside of your web application server's file hierarchy. For example, in a development environment you may find yourself frequently reinstalling Tomcat and unless you create a build script to automate the Tomcat installation and configuration process avoiding having to recreate $CATALINA_HOME/sakai
and sakai.properties
each time has its advantages.
...
Tool collections for the home page can be configured for each site type. However, if the wsetup.home.toolids.*
property is not set, the Worksite setup tool will default to the following set of tools for the home page: sakai.iframe.site
, sakai.summary.calendar
, sakai.synoptic.announcement
, sakai.synoptic.chat
, sakai.synoptic.messagecenter
. Synoptic tools will be added or dropped from home page depending on whether their linked tool exists in the site or not. See SAK-15504 - Upgraded site: editing My workspace leads to duplicate Home CLOSED and SAK-16747 - tools are not auto-added into Home tool page CLOSED for more details.
wsetup.home.toolids.count=5 wsetup.home.toolids.1=sakai.privacy wsetup.home.toolids.2=sakai.iframe wsetup.home.toolids.3=sakai.synoptic.announcement wsetup.home.toolids.4=sakai.synoptic.chat wsetup.home.toolids.5=sakai.synoptic.messagecenter
...
A new group helper is enabled by default (see SAK-13413 - Group creation enhancement CLOSED for more details). Site maintainers can now create groups based on sections and roles. To switch back to the old 2.5 style of group helper (ad-hoc only), one needs to add following setting in sakai.properties
:
...
Sakai includes a property called inactiveInterval@org.sakaiproject.tool.api.SessionManager, which dictates the length of inactive time before a users session times out and allows for the enabling of a session timeout warning. Session status is now checked by the Sakai portal. If the remaining session time is less than the warning time (say 10 minutes). When a session expires, the any page requests are redirected to the URL indicated by the loggedOutUrl
sakai property. See SAK-13987 - Session Timeout Popup Utilizing Polling data from entity broker CLOSED SAK-8152 - Sakai should warn a user before the user's session times out and data is inadvertently lost CLOSED for more details.
To enable the session timeout warning, set the following properties in your local sakai.properties
with a time interval of your choosing:
...
3.1 Configure database
Sakai 20 22 database support details
Make sure to include a MySql connector jar in your CATALINA_HOME/lib.
...