In Debian / Ubuntu, simply installing one package will instantly make your web server faster. (That is, if you are serving up php!)
Here ya go:
sudo apt-get install php-apc
Next, edit the following file:
$ sudo nano /etc/php5/conf.d/apc.ini
Increase the apc.shm_size as high as is available:
A more detailed configuration can be found here:
Note: php-apc is only valid for php up to versions 5.4.x. As of PHP 5.5, caching is built in via opcache.