Note: Since Ubuntu is based on Debian I suppose that this will work on Debian too, but I haven't tested it.
This has been tested on Ubuntu 6.06.
You will have to do this as root or run the commands using sudo.
Installing the software
Run this command to install Apache2 PHP5 and MySQL5:
aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
Set root password for MySQL
Run the following command on the terminal to get into MySQL's console:
mysql -u root
When in the console run this query:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');
exitto exit MySQL's console.
Run this command as root to start Apache:
Replace start with stop or restart to stop or restart Apache, respectively.
Additionally you may run this command as root to install phpMyAdmin:
aptitude install phpmyadmin
Apache configuration file: /etc/apache2/apache2.conf
PHP configuration file: /etc/php5/apache2/php.ini
MySQL configuration file: /etc/mysql/my.cnf
Webpage root directory (what to call this?): /var/www