Skip to content

Instantly share code, notes, and snippets.

@dhavalv
Created May 6, 2016 03:59
Show Gist options
  • Select an option

  • Save dhavalv/e9e4390b46dce44cb2e8a04ebd1b5aa9 to your computer and use it in GitHub Desktop.

Select an option

Save dhavalv/e9e4390b46dce44cb2e8a04ebd1b5aa9 to your computer and use it in GitHub Desktop.
How to start XAMPP automatically in Ubuntu

How to start Xampp automatically in Ubuntu

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

@schrodingers-ape

Copy link
Copy Markdown

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)

@rahul9222

Copy link
Copy Markdown

The above snippet does not work on Ubuntu 17.10
Does any one help us

@moplin

moplin commented Apr 15, 2018

Copy link
Copy Markdown

Not working for me, any idea?

@Tresor-Kasenda

Copy link
Copy Markdown

sorry chez moi sa passe pas cette commande je ne sait pas s'il existe d'autre script a effectuez pour que sa puisse passer

@blessedjasonmwanza

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment