Normally putting up a web server with PHP and database is easy and the default settings are enough but sometimes there is need for tuning the performance. The server might be low on memory and the CPU and has (too) many things to handle. Also it is good to know how things work.
There is a great series of three articles on IBM's developerWorks -site about Tuning LAMP systems. First article is about "Understanding the LAMP architecture", second article concentrates on "Optimizing Apache and PHP" and final part is for "Tuning your MySQL server".
More practical example is on Disruptive Library Technology Jester -blog which writes about WordPress/MySQL Tuning on a Pentium III with 512M RAM box which runs a mail server (IMAP, ClamScan, Spam) and an Apache (WordPress and stuff).
Article contains setting up Alternative PHP Cache and some options for database tuning focusing on memory management. About MySQL tuning the article points out Peter Zaitsev’s “What to tune in MySQL Server after installation” and ez.no documentation on Optimizing for read performance.