For installing LAMP stack at Ubuntu 12.10 follow these steps:
1. Get root access in your terminal:
2. Install MySQL5:
apt-get install mysql-server mysql-client
Then just wait. And you’ll be prompted to type root password for mysql.
3. Install Apache2:
apt-get install apache2
Now to confirm Apache2 was successfully installed, type http://localhost/ in your browser,
and you should get this message:
It works! This is the default web page for this server. The web server software is running but no content has been added, yet.
4. Install PHP5:
apt-get install php5 libapache2-mod-php5
then restart apache:
5. Test if php was installed:
Go to directory /var/www/
then create a new php file.
Now open your new file:
Type whatever php you want. Like this:
<?php echo "Hello Linux-World"; ?>
Then hit ctrl+x, and save.
Now to test your php file just type:
And you will probably see:
in your console.
Note: Remember to configure your php.ini and apache conf file. Have fun.