1. Install Apache
sudo apt install apache2
2. Install MySQL
sudo apt install mysql-server
3. Install PHP
sudo apt install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
4. Restart Server
sudo service apache2 restart
5. Check Apache
Open a web browser and navigate to http://localhost/. You should see a message saying It works!
6. Check PHP
You can check your PHP by executing any PHP file from within /var/www/. Alternatively you can execute the following command, which will make PHP run the code without the need for creating a file .php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
Congratulations, you have just Installed a Ubuntu LAMP Server!
For for see the video-