Install Apache2 first. After that, do the following:
apt-get install php5 php5-gd
To enable the module and activate php5 within apache:
a2enmod php5 /etc/init.d/apache2 force-reload