Setting up a LAMP stack on Debian

in Linux, PHP, Debian, MySQL, Apache

I just setup a development enviroment using Debian as my distro. I noted however that when using tasksel (the wizard during installation) to install an SQL server, I got PostgreSQL. Nothing personal with it, I just haven't used it much, and thus hate all the non-MySQL behaviour quirks it has. It just had to go. And since I'd rather do things my way anyway, here's a one liner to setup your LAMP stack on a pure (as in, you've selected nothing related to web / sql during setup) installation of Debian:

root@debby:/home/hex# apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql phpmyadmin php5-mcrypt 

The above will get the latest version of Apache 2, PHP 5, Mysql 5, and assorted plumbing. It will also get you phpMyAdmin, and the PHP crypt module ( needed by phpMyAdmin on certain situations, but not listed as a dependency for some reason )

Note that Debian considers the latest version of PHP to be 5.3+ , not 5.1 or 5.2 -- there are some differences that may break non-compatible applications (most notably empty variable handling and assorted notices). Though that is the correct behaviour, make sure to check your apps!