Xampp allows you to run local server. It is a easy method to install
Apache web server add MYSQL, php, and perl. Xampp have all stuff in one
package.
Go on XAMPP site and download XAMPP. URL to download XAMPP is
http://www.apachefriends.org/en/xampp-linux.html

Let the download complete. Confirm download by opening download folder.

Open terminal and move to download folder. Verify that downloaded Xampp installer file exist there. If you have moved Xampp file in other folder than move that folder which contain Xampp file.

Make installer file to executable. Run following command

Installation requires root privilege. Switch to root user. You need to supply super user password to become root user. Super user is the user account which is created during the installation.

Run installer file

XAMPP 1.8.2 version added nice graphic setup wizard. Click on next

Keep default selected component and click on next

Installation directory is opt click on next

By default BitNami for Xampp is selected. Remove the check mark and click on next

Wait for few minutes.

Click on finish to complete the installation.

Wizard will redirect you to XAMPP default screen.

XAMPP is successfully installed. But mysql server would not start automatically. You would get following error while accessing phpmyadmin

Restart the Xampp to start all the services
Now access again phpmyadmin

We have successfully installed XAMPP 1.8.2 in Ubuntu. In our next article we would see how to start automatically xampp on start up.
Thanks http://computernetworkingnotes.com/ubuntu-12-04-tips-and-tricks/how-to-install-xampp-1-8-2-in-ubuntu.html
======================== SHORT CUT TO XAMPP CONTROLLER=========
sudo '/opt/lampp/manager-linux.run'
=====================MySQL command line
cd /opt/lampp/bin/
./mysql
=======================================
FIXING htdocs Permissions
To know currently logged in username run following command
To change ownership of htdocs folder run following command. [Replace username with your own username]
We also need to update httpd.conf file. Run following command to open apache configuration file
find following lines
Replace nobody with your user name and save the file

Logout from user and login back.
Now you can create, delete, and manage files / folder in htdocs folder. To test it
open htdocs folder

create a test.php file

open test.php and write a simple php code for testing. Save the file

access file from browser

Go on XAMPP site and download XAMPP. URL to download XAMPP is
http://www.apachefriends.org/en/xampp-linux.html
Let the download complete. Confirm download by opening download folder.
Open terminal and move to download folder. Verify that downloaded Xampp installer file exist there. If you have moved Xampp file in other folder than move that folder which contain Xampp file.
cd /home/[Username]/Downloads
ls
Make installer file to executable. Run following command
chmod +x xampp-linux-1.8.2-0-installer.run
Installation requires root privilege. Switch to root user. You need to supply super user password to become root user. Super user is the user account which is created during the installation.
sudo -s -H
Run installer file
./xampp-linux-1.8.2-0-installer.run
XAMPP 1.8.2 version added nice graphic setup wizard. Click on next
Keep default selected component and click on next
Installation directory is opt click on next
By default BitNami for Xampp is selected. Remove the check mark and click on next
Wait for few minutes.
Click on finish to complete the installation.
Wizard will redirect you to XAMPP default screen.
XAMPP is successfully installed. But mysql server would not start automatically. You would get following error while accessing phpmyadmin
Restart the Xampp to start all the services
sudo /opt/lampp/lampp restart
We have successfully installed XAMPP 1.8.2 in Ubuntu. In our next article we would see how to start automatically xampp on start up.
Thanks http://computernetworkingnotes.com/ubuntu-12-04-tips-and-tricks/how-to-install-xampp-1-8-2-in-ubuntu.html
======================== SHORT CUT TO XAMPP CONTROLLER=========
sudo '/opt/lampp/manager-linux.run'
=====================MySQL command line
cd /opt/lampp/bin/
./mysql
=======================================
FIXING htdocs Permissions
To know currently logged in username run following command
who am i
sudo chown -R username:username /opt/lampp/htdocs
sudo gedit /opt/lampp/etc/httpd.conf
User nobody Group nogroup
Logout from user and login back.
Now you can create, delete, and manage files / folder in htdocs folder. To test it
open htdocs folder
create a test.php file
open test.php and write a simple php code for testing. Save the file
access file from browser