Howto Install LAMP on Ubuntu GNOME Desktop to run Drupal

1. Install Apache2

sudo apt-get install apache2

Install Apache Modules

sudo apt-get install libapache2-mod-auth-mysql

Apache 2 configuration of clean URLs

sudo a2enmod rewrite
gksudo gedit  /etc/apache2/sites-available/default

Edit line 12 to read, "AllowOverride All". Save and exit.

See here for how to set up clean urls:
http://drupal.org/node/332318

2. Install Php5

sudo apt-get install php5-common php5 libapache2-mod-php5
sudo apt-get install php5-cgi
sudo apt-get install php5-mysql

Install GD support php5-gd

sudo apt-get install php5-gd

Configuring PHP to resolve the "Error sending email" message

sudo nano /etc/php5/apache2/php.ini

in line 672, change

;sendmail_path =
to
sendmail_path = "/usr/lib/sendmail -t -f webmaster@MYDOMAIN.TLD"

http://drupal.org/node/404190

Restart Apache

sudo /etc/init.d/apache2 restart

3. Install MySQL

sudo apt-get install mysql-server mysql-client

Restart MySQL

sudo /etc/init.d/mysql restart

Configuration MySQL

You can edit the /etc/mysql/my.cnf file to configure the basic settings -- log file, port number, etc. Refer to /etc/mysql/my.cnf file for more details.

To create a symbolic link

ln -s /path/to/real/file /path/to/non-existant/file

Something like this:
sudo ln -s ~/htdocs /var/www/htdocs

Install SSH Server

sudo apt-get install ssh

ype the following command :

Installing an SMTP server

sudo apt-get install postfix

It might ask you for a password. If it does, simply enter your account login password.

Once all headers have been fetched and downloaded, it will ask you a few questions such as your computername (which you could make "localhost") etc...just some basic questions.

For further configuration settings, type the following into the terminal as a new command :

sudo dpkg-reconfigure postfix

See here for more info:
http://www.howtoforge.com/perfect-server-ubuntu8.04-lts-p3
http://crunchbang.org/archives/2008/01/10/apache-mysql-and-php-on-ubuntu/