PHP APC is cache module provided by pecl and can be install via pecl. I assume you already had installed pecl.

sudo pecl install apc

That will install APC. After this let’s create apc.ini in /etc/php.d/.

sudo vim /etc/php.d/apc.ini

And paste this in it: [vim: to start writing hit Insert key, when finished writing hit Esc key. Ctrl+z twice to save and exit OR :wq]

extension=apc.so

Open /usr/share/pear/pearcmd.php for writing:

sudo vim /usr/share/pear/pearcmd.php

Paste/type this in it for memory management at the beginning:

@ini_set('memory_limit', '16M');

Normally i keep it at 32MB, but choice is yours.

Now restart the web server and check it via phpinfo().

To upgrade it in future:

sudo pecl upgrade apc