The Ubuntu developers felt that users often had to install multiple packages to install certain task specific software, such as a LAMP server or a desktop environment. Sometimes people get confused about which package to install and which not to. So they created a script which can install all the packages related to a particular task in one click. It is called tasksel.
The full form of Tasksel is Task Select. That is, you select a task in it and then it will automatically installs all the packages related to that particular task. It does not require to select all packages related to a particular task separately. For example if you select Xubuntu Desktop, then it will install all the packages related to Xubuntu desktop on your pc.
Installing Tasksel
If Tasksel is not installed on your computer/server then you can install it by following command:
sudo apt-get install tasksel
Installing LAMP Server using Tasksel
Enter the following command in the terminal
sudo tasksel
Now you will see something like this:

Here select “LAMP Server” and click on Ok.

LAMP Server will get installed with in few minutes. Open http://<ipaddress> on your browser. And you will see Apache’s default server page.
Now execute the following command.
sudo mysql_secure_installation
And follow the instructions on the screen.
Now your LAMP Server is ready.
Now you can upload your PHP application to the /var/www/html folder.