Quick Install Using Tasksel
Instead of installing Apache, MySQL, and PHP separately, tasksel offers a convenient way to get a LAMP stack running quickly. Install tasksel if not already installed by default.
sudo apt install tasksel
Use tasksel to install the LAMP stack.
sudo tasksel install lamp-server
Enter the prompt for a MySQL root password.