As part of the processing of migrating our moodle sites to their new home, I investigated setting up apc - the "alternative php cache" managed as a pecl project.
Installing apc on Ubuntu couldn't be easier... this is basically a post I contributed to Moodle.org ... thought it'd be useful here too.
Assuming you have php5 and apache2 all up and happy on your Ubuntu server ;)... this should get you over the line with apc:
1. Install pear (and the various libraries for pecl to install)