...
...
...
...
...
...
...
...
...
...
...
...
...
...
1.0 Sakai 12 pre-requisites
To begin with the following items must be installed (you may skip any you all ready have installed.
...
Sakai 11.0 was QA tested with jre-1.8.0_77, maven-3.2.3, tomcat-8.0.32
2.0 Get the binary archive
Binary limitations. Post-release patches are not always packaged as jars, so a binary install forces a relatively static implementation that cannot be as readily patched later.
...
The latest Sakai binary archive is available at http://source.sakaiproject.org/release/.
3.0 Verify/Install Java 1.8
Oracle's Sun Java SE 8, a.k.a Java 1.8, is the required version to use with the Sakai. Certain files, such as *.jsp and *.jws, require compilation so downloading and attempting to use only the run time environment (JRE 8.0) will not suffice.
...
java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_31-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
3.1 Set Java environment variables
Several environment variables and related properties must be set for Java. For UNIX operating systems one typically modifies a startup file like ~/.bash_login
to set and export shell variables while Mac users typically set and export environment variables in .bash_profile
. For Windows, go to Start -> Control Panel -> System -> Advanced -> Environment Variables
and set JAVA_HOME
via the GUI.
...
Windows: append the string to the end of the Path
system variable
Set JAVA_OPTS
The default Java virtual machine (JVM) settings are insufficient for an application of Sakai's size. As a result several JVM parameters must be increased for Sakai to run, while others may need to be adjusted for optimal performance.
...
In the case your locale is not fully supported in Java (as it happens with Basque or Mongolian languages) you should read this information:
Endorsed I18n Project
Specify an HTTP Proxy (optional)
In environments where local network policy or firewalls require use of an upstream HTTP proxy/cache, Sakai needs to be configured accordingly. Otherwise components or services which use HTTP requests, such as the BasicNewsService
for RSS feeds in the News tool, cannot retrieve data from the target URLs. This can be fixed with the following JAVA_OPTS
arguments:
-Dhttp.proxyHost=cache.some.domain -Dhttp.proxyPort=8080
4.0 Install Tomcat 8
- Apache Tomcat - http://tomcat.apache.org/
- Note: Always do a fresh install of Tomcat 8
- Note: For Sakai versions prior to 11.4 please use Tomcat 8.0.34 or earlier. Later versions of Tomcat may cause problems. example: SAK-31608 - Sakai has startup warnings on Tomcat 8.0.39+ CLOSED
- 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 8.0.43\
- Download Tomcat 8 - https://tomcat.apache.org/download-80.cgi
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
- Extract to /opt (symlink the apache-tomcat-8.0.x directory to tomcat after extracting)
Example (assuming you have saved the file as /opt/apache-tomcat-8.0.x.tar.gz)
cd /opt
tar xzvf apache-tomcat-
8.0
.x.tar.gz
ln -nsf apache-tomcat-
8.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-
8.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 (from Install Java 1.8).
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.
We recommend using -Djava.util.Arrays.useLegacyMergeSort=true until this issue can be resolved - SAK-31707 - Broken Equality Comparators in Gradebook RESOLVED
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 8 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 -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 8 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 8 significantly.
For Sakai 12 and earlier: Edit the file conf/context.xml and add this JarScanFilter block to the <Context>
|
For Sakai 19 and later: After the JSF 2.3 migration, users may update the tomcat configuration to this one:
|
5.0 Unpack the Sakai binary distribution
The Sakai binary archive is available at http://source.sakaiproject.org/release/.
...
If you wish to configure a binary installation you'll need to manually create a /sakai
folder in $CATALINA_HOME to hold your sakai.properties
file.
5.1 Configure Sakai
The sakai.properties
file is a central configuration file that is typically stored in a /sakai
subdirectory relative to the Tomcat home directory ($CATALINA_HOME
). It is a non-XML text file containing a series of key/value pairs that is read using the load method of java.util.properties. Settings in sakai.properties
govern everything from setting your institution's name to configuring your database. All settings in sakai.properties
are read on startup; any changes you make subsequently will only take effect when you restart web application server.
...
-Dsakai.home=/path/to/desired/sakai/home/
5.2 Configure Database
Sakai 11 database support details
...
mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 272 Server version: 5.1.46 MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database sakaidatabase default character set utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all on sakaidatabase.* to sakaiuser@'localhost' identified by 'sakaipassword'; Query OK, 0 rows affected (0.00 sec mysql> grant all on sakaidatabase.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit
6.0 Start/Stop Tomcat
Start/stop Tomcat from the terminal by running the appropriate startup/shutdown script located in $CATALINA_HOME/bin
:
...