For the desktop version you can do:
If you want to install Ubuntu Server (recommended) here is a tutorial:
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server php5-gd phpmyadmin
Or you can use this one:
Please note that although the above is a great guide, you probably don't need to install Bind9 like they recommend unless you have many servers on your network.