Installing LAMP Stack (Linux, Apache, MySQL, PHP) using Tasksel in Ubuntu.

The word LAMP is an acronym for Linux, Apache, Mysql, PHP / Python / Perl, a combination of all first character. There are many tutorials around help you to set up LAMP stack and in most of the tutorials you will have to install Apache, Mysql, PHP one by one by running number of commands.

Here in this tutorial we will learn Tasksel, which helps to install LAMP stack with most easiest step. We can install LAMP by using Using Tasksel GUI and Using Single Line Tasksel Command.

Install Tasksel

Tasksel enables us to install LAMP stack bundle software. Run following commands on terminal to install Tasksel.

Using Tasksel GUI

Step 1: Opening Tasksel Interface:
Generally, many people install all software separately, this is time-consuming and we have to run many commands on terminal. Tasksel makes it short and saves time and makes it easy to install LAMP stack.
To open Tasksel Interface, need to run following command on terminal:

Step 2: Select LAMP Server:
Tasksel GUI looks like shown in this below image. Here select LAMP Server by pressing space & then press tab to select “ok” to start installation process.

Tasksel GUI

This installs all LAMP software one by one automatically.

Step 3. Setting Mysql Password:
When the installation process will prompt you to set a new password for MySQL server, type and confirm the password again and hit ok.

Tasksel Setting Mysql Password

The installation process will continue as below screen.
Lamp installation process

End of this installation process will complete the installation of LAMP stack.

Using Single Line Tasksel Command

Installation process via Single Line Tasksel Command is same as Tasksel GUI, except you do not have to open Tasksel Interface. You just have to run following command on terminal and this will start installation process of LAMP.

To make sure Apache server and PHP running fine, we will create a file called info.php into the /var/www/html directory and paste below code in this file.

Now go to browser and open url http://localhost/info.php

That’s all. You are done.

Leave a Reply

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