Recently I installed the beta version of apc using pecl under Ubuntu 10.04, it took a few attempts before I worked out what the required libraries where so here is my very quick guide to getting it installed and running.

To perform the install, first install the required libraries and second install of apc itself.

sudo apt-get install apache2 php5 php-pear php5-dev libpcre3-dev
sudo pecl install apc-beta

When install apc you will be asked a couple of questions on configuration options best to leave them as default if you don’t know what they do. Once the install is complete you should get output saying.

Build process completed successfully
Installing '/usr/lib/php5/20090626/apc.so'
install ok: channel://pecl.php.net/APC-3.1.6
configuration option "php_ini" is not set to php.ini location
You should add "extension=apc.so" to php.ini

Simply add the line as it says to you php.ini and job done. If you check your phpinfo page output you should see a section for apc saying ‘APC Support enabled’.

I know its a very simple process but second time I have had to spend time figuring out the required libraries and though I would save people time by posting this up.