systemd Services

Services, systemd and Surviving a Reboot

Apache 129 , PHP-FPM, MySQL 524 and your own programs must already be running when a request arrives, and on every distribution in this book the program that starts and supervises them is systemd 142,543 , process 1. This section takes one real program, hello-api, a PHP 8.5 JSON endpoint, from a command you type to a hardened service that survives a crash and a reboot. Processes and Monitoring compares it with pm2 29,762 and supervisord 121,801 ; Laravel reuses it for Laravel 2,157 queue workers.

Subsections