1. Install Ubuntu
  2. sudo apt-get install apache2
  3. sudo apt-get install php5 libapache2-mod-php5
  4. sudo /etc/init.d/apache2 restart
  5. sudo apt-get install mysql-server
  6. sudo vim /etc/mysql/my.cnf
    comment out “bind-address = 127.0.0.1”
  7. sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
  8. sudo vim /etc/php5/apache2/php.ini
    uncomment “extension=mysql.so”
  9. sudo /etc/init.d/apache2 restart

Hat Tip: http://www.supriyadisw.net/2006/12/lamp-installation-on-ubuntu