Whether or not Joomla/Drupal/Wordpress will run depends on the P in LAMP. If you mean PHP, then the distribution essentially doesn't matter, as you can install a PHP server on virtually every major distribution.
I've had the simplest time configuring/installing PHP as an upstream to Nginx; although Ubuntu Server does come with LAM(PHP) as an option right off the installation CD, which makes installation/configuration a no-brainer. Apache is very versatile, the drawback of it is that it loves to eat up RAM, but a Pentium 4, even with only 256MB of RAM, would be able to run a PHP server easily.