How to Install and Configure LAMP on Ubuntu 13.04/13.10/14.04

LAMP means – Linux – Apache – MySQL – PHP. LAMP installation is a bit difficult on Ubuntu and other Linux Operating Systems. If you know the usage of Terminal you can install LAMP very easily. LAMP installation require 4-5 steps in Ubuntu.

1. Apache 2 installation
2. PHP 5 installation
3. MySQL Installation
4. PHPmyadmin installation
5. PHPmyadmin configuration
LAMP installation
LAMP on Ubuntu 13.04

LAMP on Ubuntu
LAMP server

1. Apache2 installation

Open Terminal

Enter this command

sudo apt-get install apache2

Enter your password when ask. Press “Y” to install apache2 on your system

After installation , open any web browser and type “localhost” and press ‘Enter’. If it works , we can move to the next step.

2. PHP5 Installation

PHP is a very popular server side language for web development. This language is used in more than 80% of the websites. PHP is popular but you won’t get high salary , because PHP is a simple comparewith other languages and also there are thousand of PHP developers.

Enter this command on your Terminal

sudo apt-get install php5 libapache2-mod-php5

Then restart your Apache server

sudo /etc/init.d/apache2 restart

To check your php , enter this command and create a php file

sudo gedit /var/www/checkphp.php

/var/www – is my folder . This command will create a checkphp.php ( name of the file ) in www folder , which is in var folder.
Paste this piece of code. This code will print PHP information on your Web browser.


If it works , then it means , you successfully installed PHP 5 on your system.

3. MySQL Installation

MySQL is free and open source database. It is free for medium users . I think there are some paid versions for high end users. A few years ago Oracle bought MySQL . Now MySQL is a part of Software giant Oracle. MySQL installation is also simple like other two.

Open your Terminal and enter this command

sudo apt-get install mysql-server

Follow configuration steps

 4. PHP MyAdmin Installation 

 PHPmyadmin is a simple web application to manage our MySQL database. Most of the PHP Developers prefer PHPmyadmin over other Database clients. PHPmyadmin is lighter and powerful client to manage Database.

Enter this command on Terminal

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

Follow configuration steps.Please select apache2 as your web server. You need one more step to view phpmyadmin on your web browser.

5. PHP MyAdmin configurations to view on Broswer

Before use , you need to configure php.ini file

Enter this command on Terminal

sudo gedit /etc/php5/apache2/php.ini

Replace this



Just remove ; from above line. ( ; is for comment , just like // in most of computer languages ).

Then restart your apache2 server

sudo /etc/init.d/apache2 restart

How to use PHPmyadmin on Web browsers ?

Enter this command

sudo ln-s /usr/share/phpmyadmin /var/www/phpmyadmin

After that open your web server and enter localhost/phpmyadmin on the address bar.
If you have any doubts and questions , please watch this video.

If you have any further questions , please visit our Facebook page

Leave a comment

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