# 1 – Installing MySQL 5.0
#First we install MySQL 5.0 like this:
#aptitude install mysql-server mysql-client
# 2 – Installing Apache2
# Apache2 is available as a Debian package, therefore we can install it like this:
# aptitude install apache2
# Verificar se o apache está funcionando.
# localhost
# 3 – Installing PHP5
#We can install PHP5 and the Apache PHP5 module as follows:
#aptitude install php5 libapache2-mod-php5
# Reiniciar o apache
#/ etc/init.d/apache2 restart
#5 Testing PHP5 / Getting Details About Your PHP5 Installation
#The document root of the default web site is /var/www. We will now create a small PHP file (info.php) in that directory and call it in a browser. Th
#joe /var/www/info.php
Verificar se o php foi instalado corretamente.
localhost/info.php
# Getting MySQL Support In PHP5
# To get MySQL support in PHP, we can install the php5-mysql package. It’s a good idea to install some other PHP5 modules as well as you might need th
# aptitude search php5
# Pick the ones you need and install them like this:
# aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
# Now restart Apache2:
#/ etc/init.d/apache2 restart
#7 phpMyAdmin
#phpMyAdmin is a web interface through which you can manage your MySQL databases. It’s a good idea to install it:
#aptitude install phpmyadmin
Fonte: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-debian-lenny-lamp