Just a short explanation I found somewhere on the web.
How to install LAMP on EC2 Ubuntu with phpmyadmin in 4 mins
Harry-MacBook-/User/Harry/ec2 $ ssh -i id_rsa-ubuntu ubuntu@ec2-185-77-129-63.compute-1.amazonaws.com
sudo aptitude update && sudo aptitude dist-upgrade
It will install a bunch of updates and in a short while it will be done.
At that point you need to execute:
sudo reboot
sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
Read more at www.edukatr.comHow do you know what is your public IP on EC2? It’s very easy. If you logged into the server using the public DNS
ec2-185-77-129-63.compute-1.amazonaws.com, then your IP is185.77.129.63. So go to your favorite web browser by typing inhttp://185.77.129.63{as an example in my case}. A page should come up which says “It works”. This is how you know Apache is working.