This time as you can see it did not ask to save php files which means php too is correctly installed now.
Finally i prefer to use phpmyadmin. So if you like you too can install it . sudo apt-get install phpmyadmin
You will be asked to choose the webserver that should be automatically configured to run phpmyadmin select apache2. You can select it by pressing space bar and then press enter.
Lets save this text "apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [ OK ] " This is not a real error. You wont have any problem at all. But if you don't want this error message to come then you can create a file
sudo nano /etc/apache2/conf.d/fqdn
and type
ServerName localhost
Restart the server this time you won't get any error message like you got in the beginning.
That's it. You have installed Apache,MYSQL and PHP successfully.