We need to start below command when we start out system everytime
sudo /opt/lampp/lampp start
Now, We don't need start everytime, just create one script for handling autostart process into Ubuntu
- Open terminal and type below Command
sudo gedit /etc/init.d/lampp
- Now, put this script into lampp file
#!/bin/bash
/opt/lampp/lampp start
- Close file and make executable file for using command:
sudo chmod +x /etc/init.d/lampp
- Scipt make to all run level executable
sudo update-rc.d lampp defaults
After applying this, you'll need restart your system and open localhost. You don't need to run /opt/lampp/lampp start
command
This doesn't work for me. Nothing happens when I run this:
sudo update-rc.d lampp defaults
It just goes to the next line with no message, and no links are created in my rc#.d folders. If I do
sudo update-rc.d lampp enable
It returns the following message:
update-rc.d: error: lampp Default-Start contains no runlevels, aborting.
I've also tried creating a rc.local in my /etc/ and putting the script there, but it doesn't work (xampp doesn't start on boot)