If you’re on a Ubuntu-based distro, you’re in luck: you don’t have to install XAMPP to get a web server started! Just install the following packages, including all dependencies, in order:
Restart Apache with sudo /etc/init.d/apache2 restart. (Apache should complain like this: “Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName” — to resolve this, open up /etc/apache2/httpd.conf and add a line like ServerName localhost. See this page for more info.)
Optionally, install phpmyadmin.
For phpmyadmin, the administrative user is “root”, as usual.
Your web pages are now stored in the /var/www/ directory. From here, symlink to any other directory in your hard drive to include that directory into your web server! The beauty of this method, instead of going with XAMPP, is that your system will automatically update all web-server related components whenever you update your system with apt-get or Synaptic Package Manager or whatever. Also, Apache will start automatically whenever you reboot. No more downloading XAMPP and extracting as superuser, and repeating it all over again every time XAMPP updates to a newer version. No more firing up a terminal and telling XAMPP to start with that horrendously long command sudo /opt/lampp/lampp start. Hooray Ubuntu!
The above steps worked fine for me on Xubuntu 8.04.1.
UPDATE March 23, 2009: I’m on Arch Linux now, and I simply followed the Arch wiki on Apache et al to get things rolling without XAMPP. And it works just fine. Use Arch!