Setting up KAMP (Kubuntu, Apache, MySQL, PHP)

21 Jan 2008
Posted by m1mic

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:

  1. Open Konsole
  2. Login as root
    • sudo -s
  3. Make sure that the repository is up to date
    • apt-get update
  4. 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
  5. 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
  6. Enable the Modrewrite module
    • a2enmod rewrite
  7. restart the server
    • apache2 -k restart
  8. Set the WWW document root file permissions to my own user account
    • cd /var
    • chown <username> www/
  9. 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