How-To Technical

How to install LAMP server in Ubuntu

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.

The simplest and most likely to be used approach is to use the following command in terminal:


sudo apt-get install lamp-server^

Open your browser and type the following:


This should show the default landing page of Apache

Use the following command in terminal:

apt-get install phpmyadmin

This will install the full phpadmin tools to help you mange MySQL and your website from a Web Enabled UI

To access MySQL, you can use the following URL:



Finally to test PHP, place a php file (eg: test.php) in your www folder ( /var/www/) with the following script:




Now call the file through your browser by typing http://localhost/test.php

And while there are other ways to install LAMP (this is how i do it) — be sure to restart all services (reboot works to)

– Done



One reply on “How to install LAMP server in Ubuntu”

Fantastic website. Lots of helpful information here.

I’m sending it to some buddies ans additionally sharing in delicious.

And of course, thank you on your sweat!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.