XAMPP is simply a cross-platform Apache distribution that includes the following:

  • MySQL
  • PHP
  • Perl

UPDATEXAMPP 1.8.0 Available

The installation for XAMPP is very simple, just download and extract the files to the appropriate folder and start it. If you find difficulties installing XAMPP under Ubuntu, then this tutorial may help you, which contains simple instructions and fixes for some errors that you may encounter while using this Apache web server.

XAMPP Installation

To install it under Ubuntu 11.10/11.04/12.04 or any older version of Ubuntu, open the terminal and run these commands:

cd /tmp && wget -O xampp-linux-1.7.7.tar.gz http://goo.gl/mZx8B

sudo tar xvfz  xampp-linux-1.7.7.tar.gz  -C /opt

Start now XAMPP with the following command:

sudo /opt/lampp/lampp start

You can now access XAMPP from this link to see if it is well started:


The default folder for installing your web files and applications is /opt/lampp/htdocs. For stopping or restarting XAMPP, you can use later these commands:

sudo /opt/lampp/lampp stop

sudo /opt/lampp/lampp restart

Adding A Control Panel For XAMPP (Optional)

To add a control panel for XAMPP under Ubuntu to start/stop Apache/MySQL/ProFTPD via a GUI, then run the following commands:

wget http://dl.dropbox.com/u/47950494/xampp-control-panel.desktop

mv xampp-control-panel.desktop ~/.local/share/applications/

Starting XAMPP Automatically At Startup

Open the terminal and run this command:

sudo gedit /etc/init.d/xampp

Add now these two lines:

/opt/lampp/lampp start

Press Ctrl+Q and save your file. Next, give this script file execution permission with this command:

sudo chmod a+x /etc/init.d/xampp

Then run this command:

sudo update-rc.d xampp defaults

In the next system reboot, XAMPP will start automatically.


If you get these errors when starting XAMPP:

Error 1:

XAMPP: Another MySQL daemon is already running.

Fix it with this command:

sudo /etc/init.d/mysql stop

Error 2:

XAMPP: Couldn't start MySQL!

Fix it with these commands:

sudo chown -hR root /opt/lampp

sudo chmod -R 777 /opt/lampp

sudo /opt/lampp/lampp restart

That's it!

NoteCan also be installed in Ubuntu 12.04/10.10/10.04.