XAMPP startup

👉  For the users of Linux

If you need to start XAMPP auto­mat­i­cal­ly after a reboot, here's a basic way to do it using sys­temd, which is the init sys­tem for most Linux distributions:

1) Create a systemd service file

Open a text edi­tor to cre­ate a new file, for example:

sudo nano /etc/systemd/system/xampp.service

Add the fol­low­ing con­tent to the file:

[Unit]
Description=XAMPP Control Panel
After=network.target

[Service]
Type=forking
ExecStart=/opt/lampp/lampp start
ExecStop=/opt/lampp/lampp stop
ExecReload=/opt/lampp/lampp reload
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Save and close the file (Ctrl+X, then Y to con­firm, and Enter to save).

2) Enable the new service

Reload the sys­temd man­ag­er configuration:

sudo sys­tem­ctl daemon-reload

Enable the XAMPP ser­vice to start at boot:

sudo sys­tem­ctl enable xampp

3) You can now start XAMPP using:

sudo sys­tem­ctl start xampp

Leave a Reply

Your email address will not be published. Required fields are marked *