Auto Run Xampp en Linux

Para iniciar automáticamente Xampp desde nuestro servidor debemos crear un servicio:

nano /etc/systemd/system/xampp.service

Dentro del archivo añadiremos el código del servicio:

[Unit]
Description=xampp

[Service]
ExecStart=/opt/lampp/xampp startapache
ExecStart=/opt/lampp/xampp startmysql
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Con la instrucción ExecStart ejecutaremos el servidor Apache y MySql.

Ahora hay que activar el servicio con :

systemctl enable xampp.service
Asystemctl daemon-reload

Para comprobar el estado del servicio:

systemctl status xampp.service

Publicar comentario