- This line was added.
- This line was removed.
- Formatting was changed.
In this guide we will show you how to install and configure Jetty for Shibboleth on Ubuntu 20.04.
You can find the more detailed official Shibboleth documentation at https://wiki.shibboleth.net/confluence/display/IDP4/Jetty94.
You'll first have to install Jetty, you can use the one shipped with Ubuntu or you can also download Jetty and install it yourself. If you want to install Jetty yourself, you will have to take a look at their own documentation here.
$ sudo apt update $ sudo apt upgrade $ sudo apt install jetty9
Next up we want to add some required configuration in our Jetty `/etc/jetty9/start.d/start.ini` file. Don't forget to change the parameters to your needs, at ISW we have given Jetty 3GB of RAM instead of the default 1.5GB.
Note: this file and or folder might not exists yet, you'll have to create it yourself.
# Allows setting Java system properties (-Dname=value) # and JVM flags (-X, -XX) in this file # NOTE: spawns child Java process --exec # Uncomment if IdP is installed somewhere other than /opt/shibboleth-idp #-Didp.home=/path/to/shibboleth-idp # Newer garbage collector that reduces memory needed for larger metadata files -XX:+UseG1GC # Maximum amount of memory that Jetty may use, at least 1.5G is recommended # for handling larger (> 25M) metadata files but you will need to test on # your particular metadata configuration -Xmx1500m # Prevent blocking for entropy. -Djava.security.egd=file:/dev/urandom # Set Java tmp location # ISW Note: Make sure that this directory exists! You could change it to /tmp forexample -Djava.io.tmpdir=tmp
Now once you have configured some general parameters for Jetty, you will need to specify where Jetty can find the Shibboleth war file.
Make a directory in `/etc/jetty9` called `webapps`, create a file called `idp.xml` and add the following contents.
<Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="war">/opt/shibboleth-idp/war/idp.war</Set> <Set name="contextPath">/idp</Set> <Set name="extractWAR">false</Set> <Set name="copyWebDir">false</Set> <Set name="copyWebInf">true</Set> <Set name="persistTempDirectory">false</Set> </Configure>