Description=MidPoint Standalone Service
ExecStart=/usr/bin/java -Xmx2048m -Dmidpoint.home=/opt/midpoint/var -jar /opt/midpoint/lib/midpoint.war
Running midPoint with systemd
This page describes the method how to set up midPoint server for systemd run control. This is the usual setup to start midPoint automatically after system boot on UNIX-like (Linux) systems.
This page describe the behaviour with static definition of the systemd service - example. To generate the systemd service customized to your environment you can use feature of midpoint.sh.
The following steps assume the midPoint installation in
/opt/midpoint directory, owned (both directory and its content) as (previously created) user
The service will be started as user
midpoint and will listen on default TCP 8080 port.
Create a new file
/etc/systemd/system/midpoint.servicewith the following content:midpoint.service
-Xmx2048mneeds to be modified for bigger deployments accordingly.
ExecStartline for versions 4.6 and later is different, because the packaging was changed from WAR to JAR:
ExecStart=/usr/bin/java -Xmx2048m -Dmidpoint.home=/opt/midpoint/var -jar /opt/midpoint/lib/midpoint.jar
Run the following commands to enable midpoint service:
sudo systemctl daemon-reload sudo systemctl enable midpoint
Start midPoint as systemd service using the following command:
sudo systemctl start midpoint
You can monitor the startup in
/opt/midpoint/var/log/midpoint.log(standard midPoint log) or in
/var/log/syslog(the file name may vary; if systemd is used,
/opt/midpoint/var/log/midpoint.outis not used.
You can stop midPoint as systemd service using the following command:
sudo systemctl stop midpoint
To disable automatic midPoint startup/shutdown, use the following command:
sudo systemctl disable midpoint
If you wish to customize JVM parameters, just modify
ExecStart directive in the
midpoint.service file and restart midPoint.
Systemd allows you to specify service dependencies.
For example to specify that midPoint requires PostgreSQL database (running as systemd service on the same host), just uncomment the lines