Install LAMP on Ubuntu 12.04 LTS

To install LAMP server on Ubuntu –

On terminal, do –
[code]
sudo apt-get install tasksel
sudo tasksel install lamp-server

[/code]

Test Apache

Go to URL http://localhost/ in the browser. The message “It Works!” should be displayed.

Test PHP

[code]
sudo vi /var/www/testphp.php
[/code]

Add the line :
[code]
<?php phpinfo(); ?>
[/code]

Save and close the file

Got to the URL http://localhost/testphp.php in the browser. The php status page should be displayed.

Test MySql

Open MySQL monitor In the terminal with the following command –
[code]
mysql -u <username> -p
[/code]

Provide the username ( and password when prompted) which you had set during the setup above.
The program should advance to display the “msql>” prompt.
Close mysql monitor by command exit.

Kj
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *