per installare il tutto ho utilizzato questo comando:

apt-get install apache2-mpm-prefork mysql-server libapache2-mod-php5 php5-mysql php5-gd