One of my clients needed APC installed for their application, so I initially tried to install it via WHM module installer …. this failed. Here are the steps that I took to get it working via CLI
First download the newest stable release of APC and then run the following commands.
tar -xzf APC-3.1.6.tgz
If you do not have pcre installed the make install will fail. So make sure to run the following yum command to install it with the development packages for safe measure.
yum install pcre.i386 pcre-devel.i386
This is the configure line that I used, your php-config location MIGHT be different so make sure to double check that
./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/bin/php-config
Lastly find the correct php.ini that your system is using and then edit that ini and add the following config settings near the end of your php.ini.
php -i | grep php.ini
Config to add before the “zend” section.
I also ran into an issue that when the apc.so was compiled it was not placed in the proper extension_dir, I had to manually copy it to the correct folder. Once you have done all that stop and then start Apache and walla you should be all set. check your php.ini to make sure APC shows up.