For this article, Ill assume that you already have Ubuntu installed – and then have a go at installing LAMP
Read it at Ubuntugeek
What do those commands do? Well, the first one installs all of the packages needed. The second one uses sed to remove the semicolon (which denotes a comment) from the php config file, thus allowing php to work with mysql. The third one simply restarts apache.