I’m sick of having to find a good source for this so if you are installing via a debian flavor of linux, such as ubuntu do the following three steps.
1) Open Terminal and type sudo apt-get install apache2
2) sudo apt-get install mysql-server libmysqlclient15-dev
3) sudo apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl4-open-ssl-devphp5-curl phpmyadmin
If you need more get more, but this usually covers it for me.