Install XAMPP on Ubuntu

XAMPP is a free, open source stack that contains Apache web server, MySQL database, PHP, and Perl. The main goal of XAMPP is to build an easy to install Apache environment for developers. Unlike LAMP, and LEMP stacks, It makes the developers so easy to have all packages installed at once in a couple of minutes. XAMMP is acronym of X(Cross platform),Apache, MySQL, PHP, and Perl.

In this handy tutorial, let us see how to install XAMPP stack on Ubuntu 15.04, and its previous versions such as 14.04, 13.10 etc.

Install XAMPP On Ubuntu

Download the latest version from the Official Page  (https://www.apachefriends.org/download.html). As of writing this article, the latest version was 5.6.8.

After downloading the XAMPP package, make it executable as shown below.

sudo chmod +x xampp-linux-x64-5.6.8-0-installer.run

Now, install XAMPP stack as shown below.

sudo ./xampp-linux-x64-5.6.8-0-installer.run

You’ll be asked to answer a couple questions. Here. I will go with defaults.

Press Y to accept the defaults.

----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] :y
Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue:
----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
 Installing
 0% ______________ 50% ______________ 100%
 #########################################
----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

Starting/Stopping XAMPP Server

XAMPP will be installed in /opt/lampp directory. After installing XAMPP, you can start it using the following command.

sudo /opt/lampp/lampp start

Sample output:

Starting XAMPP for Linux 5.6.8-0...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

Like wise, you can stop the service using command:

sudo /opt/lampp/lampp stop

Sample output:

Stopping XAMPP for Linux 5.6.8-0...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...ok.

****************************************************************
UNinstall XAMPP from ubuntu
****************************************************************
sudo chmod +x /opt/lampp/uninstall
deepak@deepak-HP-1000-Notebook-PC:~$ sudo /opt/lampp/uninstall