How to install LAMP server in Ubuntu 11.04 / 10.10 / 10.04

If you are a web developer proficient in PHP& MySQL, you may be using the popular WAMP Server (Windows, Apache, MySQL and PHP) in your windows platform. The more powerful Linux and Unix platforms have a similar package called LAMP which stands for Linux, Apache, MySQL and PHP and serves the purpose of web development based on Open Source concept. Apache is the Web server, MySQL is the relational database and PHP (Preprocessor Hyper Text) is an object oriented programming language.

There are many approaches to installing LAMP server in Ubuntu 11.04/10.10. The simplest and most likely to be used approach is to use the following command in terminal:

sudo apt-get install lamp-server^

Note: Including the ^ symbol

The command initiates the download of LAMP server to your PC with a password prompt and when finished, its done!
Open your browser and type the following:

http://localhost/

and hit enter. If you get the following screen, then Apache definitely works.
To access MySQL, you can use the following URL:

http://localhost/phpmyadmin

The following screenshot depicts PHP Myadmin being explored with your browser.
Finally to test PHP, place a php file (eg: test.php) in your var/www folder with the following script:

Now call the file through your browser by typing http://localhost/test.php
There are other procedures to install LAMP, like using tasksel or installing Apache, MYSQL and PHP separately

With Regards,
S. Praveen

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s