Alternate PHP Cache, is now the most maintained free/open source op-code cache, and is being used more and more as it emerges to be the
The instructions here detail how to get APC running on a CentOS 5 server. The server happened to have Plesk on it as well, which initially made me hesitant to install APC “normally”, since Plesk is so picky on what other software is installed on the server. However, it seems to have worked out well.
First, we need the pecl command so we can download and install APC from the repositories.
Do to so, we execute the following command:
yum install php-pear
But, this will not run on its own, we need the following package for the phpize command:
yum install php-devel
We also need the apxs command, which is installed via the following package:
yum install httpd-devel
Now we have all the software we need, so we install apc via the pecl command:
pecl install apc
Once that finishes, we need to enable apc in Apache’s configuration. the following command should do this for us.
echo "extension=apc.so" > /etc/php.d/apc.ini
Then we restart Apache:
And we are all done. Watch for less execution time per page, and decreased memory usage per Apache process compared to what you had
Now Yum can update PHP to 5.2. We also need a few other dependencies for phpUC:
yum install -y php php-pear php-xml
And the latest version of pear:
pear channel-update pear.php.net pear upgrade pear
Using pear to install phpUC:
pear config-set preferred_state beta pear channel-discover components.ez.no pear channel-discover pear.phpunit.de pear install --alldeps phpunit/phpUnderControl