Start XAMPP at boot

I really hate it when executing http://localhost/xampp to receive an error message like, "local server is not responding." Knowingly that XAMPP will stop when I shut my machine down (a normal Linux and Linux like systems behavior,) I patiently type, # /opt/lampp/lampp start to get the server going again.  Everything is peachy until the next time I try to access my server, then the aggravation returns.  Well, to stop all of this nonsense, there is a way to start XAMPP at boot. Meaning, when you turn on your machine, your server will start automatically for you as well.  Here is how.

Edit the rc.local file with your favorite text editor. Since I am using gedit therefore gedit is specified in my command.  Replace gedit with whatever your favorite text editor is.

$ sudo gedit /etc/init.d/rc.local

When the file open, at line 1, you'll see something like:

#! /bin/sh

Right below this line, add the following:

/opt/lampp/lampp start

Save and exit. Next time when you turn on your computer, your server will also start for you.


Post a Comment