Page History
...
Note | ||||
---|---|---|---|---|
| ||||
|
...
No Format |
---|
apt install --no-install-recommends defaultopenjdk-17-jdk-headless tomcat10 \ vim less openssl curl expat multitail gnupg net-tools systemctl stop tomcat10 |
...
No Format |
---|
rm webserver.{key,crt} |
Tune log file creation
IDP logs
You might prefer to have the IDP application write its logs to a more standard location in the file system, specifically one outside the application's own directory and on a file system where data usage is expected to grow dynamically (e.g. on /var). To do that simply set the idp.logfiles
property in any of the property files read by the IDP, e.g. within conf/idp.properties
:
idp.logfiles=/var/log/shibboleth
We also have to create that directory. And in order for the example commands in this documentation to work with either log directory location we'll remove the (still empty) log dir created by the IDP installer and replace it with a symlink to one we just created ourselfs:
No Format |
---|
install -o tomcat -g root -m 0750 -d /var/log/shibboleth/
cd /opt/shibboleth-idp/ && rmdir logs && ln -s /var/log/shibboleth logs |
Tomcat logs
Tomcat logs
By default Tomcat logs everything multiple times, including to /var/log/tomcat10/catalina.out
By default Tomcat logs everything multiple times, including to /var/log/tomcat10/catalina.out
and /var/log/tomcat10/localhost.*
, which we don't care for. So create a backup copy of Tomcat's logging.properties
and replace its content with the minumum needed to getTomcat's stdout/stderr to the console (which ends up in the systemd journal in our configuration). To prevent catalina.out from being created we deacticate it further below (in our "Systemd service" override) by setting the CATALINA_OUT=/dev/null
environment variable for the java process.
...
No Format |
---|
rm -f /var/log/tomcat10/* systemctl restart tomcat10 ls -l /var/log/tomcat10/ multitail /var/log/tomcat10/* -l 'SYSTEMD_COLORS=false journalctl -u tomcat10.service -f --no-pager' # exit with 'q' systemctl stop tomcat10 |
...
Activate the override with systemctl daemon-reload
, maybe also verify with systemd-delta | fgrep tomcat
Note that at this point Tomcat is stopped. Leave it that way and continue with the next step from this guide.
Note |
---|
...