How to install apache2 , MySQL and PHP5 in Ubuntu 11.10 ? Follow the following steps below,you can resolve this issue. In Ubuntu 64 bit version you can install LAMPP (XAMPP for linux) ,so you have to make  the installation separately and integrating them together

Update:  You can follow these steps to install Apache2, MySQL, PHP5  in Ubuntu 13.04, 12.10, 12.04

Step 1 : Install Apache 2 


sudo apt-get istall apache2
 
After finish this step. You can check apache is working or not by open your browser an type : localhost on the address bar.

 Step 2: Install PHP5 and enable in Apache 2

 Just type :  sudo apt-get install php5 libapache2-mod-php5
 And then restart the Apache : sudo /etc/init.d/apache2 restart



Create index.php for testing if apache is supporting PHP or not. Just place the simplest command like :
 <?php echo phpinfo(); ?>
for testing purpose. If it work you can see the the result same as following image.

Step 3: Install MySQL

Just type the following command :
sudo apt-get install mysql-server mysql-client

You will be ask for MySQL root password  during the installation.

Step 4: Enable MySQL support on PHP5

Back to the  http://localhost/index.php. As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.
So , we need to enable MySQL support on PHP5 by the command :
sudo apt-get install php5-mysql
But for executing, your web application may need some other package belows :

sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

 If you want to find more package to enable support on PHP5 just type :
  sudo apt-cache search php5
After all please restart apache for enable the installations :
            sudo /etc/init.d/apache2 restart

Troubleshooting

1. Error: Could not reliably determine the server's fully qualified domain name

You can view solution here: fix Apache2 could not reliably determine the server's domain name using 127.0.1.1 for ServerName

2. enable mod_rewrite for Apache 2