Backend Installation
The PMP4PG backend is a Java Spring Boot application distributed as a self-contained executable JAR. It exposes the REST API consumed by both the agents and the frontend.
Step 1 — Install Java
Java JDK 17 or later is required.
Rocky Linux / RHEL / AlmaLinux
dnf install -y java-21-openjdk
java -version
Ubuntu / Debian
apt-get install -y openjdk-21-jdk
java -version
Expected output:
openjdk version "21.x.x" ...
Step 2 — Create the Application User and Directories
# Create a dedicated system user
useradd -r -s /sbin/nologin -d /opt/pmp4pg pmp4pg
# Create directories
mkdir -p /opt/pmp4pg/backend
mkdir -p /opt/pmp4pg/logs
mkdir -p /etc/pmp4pg
# Copy the JAR
cp pmp4pg-backend-v1.0.0.jar /opt/pmp4pg/backend/
# Set ownership
chown -R pmp4pg:pmp4pg /opt/pmp4pg
Step 3 — Configure the Backend
Copy the configuration template and edit it with your environment values.
cp application.yml /etc/pmp4pg/application.yml
Edit /etc/pmp4pg/application.yml:
server:
port: 8080
servlet:
context-path: /pmp
spring:
datasource:
url: jdbc:postgresql://localhost:5432/pmp4pg_repo
username: pmp4pg
password: your_secure_password_here
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: validate
show-sql: false
logging:
level:
root: INFO
fr.data-resilience.pmp: INFO
file:
name: /opt/pmp4pg/logs/pmp4pg-backend.log
pmp4pg:
# AWR snapshot interval in minutes (default: 30)
awr-snapshot-interval: 30
# Live data retention in hours (default: 24)
live-data-retention-hours: 24
# Agent API key header name
api-key-header: X-PMP-API-Key
:::info Context Path
The backend is accessible at http://<host>:8080/pmp. All agent and frontend API calls are relative to this base URL.
:::
Step 4 — Create the systemd Service
cat > /etc/systemd/system/pmp4pg-backend.service << 'EOF'
[Unit]
Description=PMP4PG Backend Service
After=network.target postgresql-16.service
Wants=postgresql-16.service
[Service]
Type=simple
User=pmp4pg
Group=pmp4pg
WorkingDirectory=/opt/pmp4pg/backend
ExecStart=/usr/bin/java \
-Xms512m \
-Xmx1g \
-jar /opt/pmp4pg/backend/pmp4pg-backend-v1.0.0.jar \
--spring.config.location=/etc/pmp4pg/application.yml
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=pmp4pg-backend
[Install]
WantedBy=multi-user.target
EOF
# Reload systemd and enable the service
systemctl daemon-reload
systemctl enable pmp4pg-backend
Step 5 — Start the Backend
systemctl start pmp4pg-backend
# Check status
systemctl status pmp4pg-backend
# Follow logs
journalctl -u pmp4pg-backend -f
Expected log output on successful startup:
INFO Started PmpApplication in 4.2 seconds
INFO AWR Snapshot Engine initialized — interval: 30 minutes
INFO PMP4PG Backend listening on port 8080
Step 6 — Verify the API
# Health check endpoint
curl http://localhost:8080/pmp/actuator/health
# Expected response
{"status":"UP"}
{screenshot: backend-health-check}
Firewall Configuration
If a firewall is active on the backend host, allow inbound connections on port 8080 from agent and frontend hosts:
# firewalld (Rocky Linux / RHEL)
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload
# ufw (Ubuntu)
ufw allow 8080/tcp
Upgrading the Backend
To upgrade to a new version:
# Stop the service
systemctl stop pmp4pg-backend
# Replace the JAR
cp pmp4pg-backend-vX.Y.Z.jar /opt/pmp4pg/backend/
# Update the ExecStart line in the service file if needed
# Then restart
systemctl start pmp4pg-backend
Always refer to the Changelog → for any configuration changes required between versions.