Nethence Newdoc Olddoc Lab Your IP BBDock  

Setting up Sakai Wiki on Ubuntu

Deprecated: This guide is just for reference. If you want a real Documentation Management System I rather recommend Gollum or Alfresco.


as root


Install Oracle Java 8,

add-apt-repository ppa:webupd8team/java
apt update
apt install oracle-java8-installer
apt install oracle-java8-set-default
#update-alternatives --config java

Setup JAVA_HOME accordingly either in the /etc/environment file or preferably directly into your shell setup, and the system-wide one for that matter,

vi /etc/bash.bashrc

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

source /etc/bash.bashrc

Note. forcing the PATH to access JAVA_HOME/bin is not mandatory as Ubuntu already provides symlinks for the choosen Java package. Check with,

which java
which javac
java --version


Install Tomcat,

apt -y install tomcat8 tomcat8-admin

Make some handy symlink,

ln -s /var/lib/tomcat8 ~/tomcat8

Enable the Tomcat Manager web UI,

cp -pi /var/lib/tomcat8/conf/tomcat-users.xml /var/lib/tomcat8/conf/tomcat-users.xml.dist
vi /var/lib/tomcat8/conf/tomcat-users.xml

  <role rolename="manager-gui"/>
  <user username="tomcat" password="PASSWORD" roles="manager-gui"/>

Keep some trace of your tomcat manager password for your convenience,

echo "manager-gui: tomcat / PASSWORD" >> ~/README

Esp. tweak the thing for Sakai (some special JAVA OPTS),

cd /etc/default/
cp -pi tomcat8 tomcat8.dist
vi tomcat8


JAVA_OPTS="-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"

Read the logs while starting the Java powered daemon,

(on some other window)
tail -F /var/log/tomcat8/*

service tomcat8 start

Look for your defined JAVA OPTS,

ps aux | grep java

You should now be able to access the Tomcat it works welcome page,


You should also be able to access the WUI and review the Java version you are using at the bottom of the dashboard (JVM Vendor column),



Install Maven,

apt -y install maven
ls -lhF /usr/bin/mvn
mvn --version


as user

Fetch the source and switch to some release branch,

git clone
git fetch upstream
git checkout 11.x

which java
which jexec
java --version
mkdir /home/USER/tempdir
mvn clean install sakai:deploy -Dmaven.tomcat.home=/home/USER/tempdir

as root

cd /var/lib/
tar czpf tomcat8.`date +%s`.tar.gz tomcat8/
cd tomcat8/
cp -Ri /home/elge/tp/lala/* ./

Ok, you should now see the Sakai applications listing on the manager WUI,


but those are not started. Simply restart tomcat,

(on some other window)
tail -F /var/log/tomcat8/*

service tomcat8 restart

and after a few seconds you should see the applications started in the WUI.

Finally check that Sakai portal application is up and running,


Everything is fine? Then proceed with the reverse-proxy setup.


Home | GitHub | Docker Hub | Donate | Contact