How to configure ubuntu with LAMP
http://howtoubuntu.org/how-to-install-lamp-on-ubuntu
The following tutorial presumes you understand what a LAMP Server is, how to work a website from the back end and how to install software using either the Software Centre or the Terminal. It also expect experience running other Basic Terminal Commands.
There is also an excellent article on Digital Ocean that may be of more relevance if you are working on a remote or public facing server.
To install Apache you must install the Metapackage apache2. This can be done by searching for and installing in the Software Centre, or by running the following command.
To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.
To install PHP you must install the Metapackages php5 and libapache2-mod-php5. This can be done by searching for and installing in the Software Centre, or by running the following command.
Your server should restart Apache automatically after the installation of both MySQL and PHP. If it doesn’t, execute this command.
Open a web browser and navigate tohttp://localhost/. You should see a message saying It works!
You can check your PHP by executing any PHP file from within /var/www/. Alternatively you can execute the following command, which will make PHP run the code without the need for creating a file .