Install or configure PHP, Mysql and Apche2 (LAMP) on Ubuntu 12.04

This tutorial we will learn how to install Php, Mysql and Aache2 or LAMP(a webserver) on ubuntu 12.04 . If you are using Linux OS such as ubuntu and kubuntu then LAMP installation will be very much easy by running a single command.

Here we have many option to install LAMP in ubuntu such as install LAMP package using terminal directly and by running tasksel command (A single step to setup LAMP on ubuntu) .So let see below process to install LAMP.

About the LAMP :-

LAMP is basically an open source Web Development platform that uses Linux as operating system, MySql a relational deatabase management system, Apache2 as the web server and PHP (Sometimes we use perl or python instead of PHP) as the object-oriented scripting language. Similarly for Windows operating system we use WAMP for web development and if you are using MAC Operating system then install MAMP package for web development.

Option 1: How to install LAMP package by running command on terminal

This is the best process to install LAMP Server by running few command.please follow below steps:

Step 1 :- Update ubuntu packages repositories by running below command.

Step 2 :- Now run below command to install LAMP server Package.

Step 3 :-Here we have successfully installed LAMP server on ubuntu.And you will see new folder structure is created as ‘  html ‘ like /var/www/html/(Document root directory). So all your development files will come under folder of html only.

Step 4 :- Now Check php and apache2 are configured properly or not,for that create a phpinfo.php file with below script and run this files as http://localhost/phpinfo.php in any browser.

Write below script in phpinfo.php file:

Step 5 :-After running http://localhost/phpinfo.php in any browser you will get below output screen that shows that you have successfully installed or configured LAMP in your operating system.

how to install lamp php apache2 cashlele

 

Option 2: How to install LAMP Server by using TASKSEL 

This is very much easy process or single step process to install LAMP Server on Ubuntu.Please follow easy steps to setup LAMP :

Step 1 :- Update ubuntu packages repositories by running below command.

Step 2 :Before installing LAMP by Tasksel.You have to install Tasksel by running below command.

Step 3 :-Once you have done with installation of tasksel then please type sudo tasksel as command and press enter like below.

Step 4 :- After running  sudo tasksel ,you will get a prompt or window screen to select your packages to install.

Install LAMP - Tasksel configuration box
Install LAMP – Tasksel configuration box

Step 5 :-Now Select the LAMP Server and then press ok.Now you have done with LAMP installation on ubuntu.This is basically a best and short option to install php, myql and apache2 for your web development server.Thanks & pelase comment with your feedback and query.

 

You can check also:

>>How to install phpMyAdmin on Ubuntu.

>>How to install CakePHP in window with XAMPP.