Set XAMPP to automatically restart on an Ubuntu server

XAMPP, by default, does not automatically restart when the server is rebooted. To make this happen do the following :

cd /etc/rc2.d

place symbolic links to the XAMPP startup and kill processes in the rc2.d folder:

ln -s /opt/lampp/lampp S99lampp

ln -s /opt/lampp/lampp K01lampp

Now XAMPP should restart when the server is rebooted.