Thursday, 25 May 2017

How to install LAMP in Ubuntu

LAMP is an open source web development model built on Linux, Apache, MySQL and PHP. Linux operating system is the base where an Apache HTTP web Server is running, MySQL servers the purpose of relational database and PHP is the programming language to develop dynamic web sites and web applications. All the four software are free and open source. Some developers and communities accept Python in place of PHP these days. 

In this article, we will see how you can install LAMP in Ubuntu. I am using Ubuntu 17.04 but these steps will work perfectly fine for 16.10 and 16.04 LTS. 

Installing Linux : I assume you are already running a Linux distribution. If not, there are many articles over with tutorials to install Linux. 

Installing Apache 

Apache is the most popular web server with over 55% market share. Apache Software Foundation is resposible for its development and maintenance and is licensed under Apache License. 

To install apache, open terminal and use the below command:

sudo apt-get install apache2

Once the installation is done, restart the Apache server with the following command: 

sudo /etc/init.d/apache2 restart 

Once the restart is done, you can check the installation by opening a browser and opening the following link : http://localhost. If the links open fine, the installation is successfull and Apache is up and running. 

Installing MySQL 

MySQL servers the purpose of relational database management system. To install MySQL, type the below command in Terminal. 

sudo apt-get install mysql-server

Installing PHP 

PHP is a server side scripting language for web developments and can serve as a general purpose programming language too. To install PHP, below is the command: 

sudo apt-get install php5 libapache2

Once installed, you can check if PHP is working fine by using a command : 

php -r 'echo "PHP is fine";'

Hope this article helps you to install LAMP in Ubuntu successfully. Let me know in the comments if you face any issue while installation. 


  1. The process for exchanging the projector lamp may vary based on the manufacturer. Hence the coaching manual should be used and followed carefully to replace the projector lamp whenever necessary. Projection TV Bulb

  2. There are actually light box for seasonal affective disorder that you can purchase that have the right amount of lux so you don't have to worry about it sad sunlamps