Lullabot developer Addi Berry put together some great screencasts on how to setup local Drupal test environments on Windows, Mac, and Ubuntu. Even though I have been running Kubuntu as my primary OS at home for over a month now, I hadn't actually set up my test server yet! To make sure I didn't make a misstep, I used Addi's video as the basis for the setup I did on my machine, but command lineified it a bit:
- Open Konsole
- Login as root
- sudo -s
- Make sure that the repository is up to date
- apt-get update
- Install Apache, MySQL, PHP5, the PHP5 GD Library, and the PHP5 MySQL configuration
- apt-get install apache2 mysql-client mysql-server php5 php5-gd php5-mysql
- Enable Clean URLs in the conf file
- vi /etc/apache2/sites-enabled/000-default
- press i to go into insert mode
- Change AllowOverride None to AllowOverride All in the <Directory /var/www/> section
- press esc
- type :wq to write the file and quit the vi application
- Enable the Modrewrite module
- a2enmod rewrite
- restart the server
- apache2 -k restart
- Set the WWW document root file permissions to my own user account
- cd /var
- chown <username> www/
- Use CVS to download Drupal
- cd /var/www/
- cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -d <directory name> -r <Drupal Tag> drupal

Comments
Setting up KAMP missing information
Hi, i've just used your tutorial and was really helpful but there is something missing. Between steps 6 & 7 i had an error because i needed to set up some envvars (user & group).
So for you using this you should check your httpd.conf before step 7 ;)