There are several different commands that can be used to install Apache and MySQL services with PHP support:
- sudo apt-get install tasksel && sudo tasksel
- sudo apt-get install lamp-server^
- sudo apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-curl mysql-client mysql-server libmysqlclient15-dev phpmyadmin
For number two the carat at the end is important.