This How-To guide is based on the following KB guide:
http://help.directadmin.com/item.php?id=400
I had to make few modification because APC-3.1.9 is not compatible with PHP-FPM
I am using PHP-FPM 5.4 in this tutorial, if you are using php-fpm 5.3 replace 54 by 53
Lets start:
Now you will be presented with a message like this one
Copy your shared extension file and edit php.ini with your favorite text editor
Look for "extension_dir" (ctrl+w)
now uncomment the line if it is commented and paste your extension directory
it should look like
add under it (you can of course modify these values to your need):
Save and close (ctrl+x)
Now restart PHP-FPM and apache
That's it. I hope it helped.
http://help.directadmin.com/item.php?id=400
I had to make few modification because APC-3.1.9 is not compatible with PHP-FPM
I am using PHP-FPM 5.4 in this tutorial, if you are using php-fpm 5.3 replace 54 by 53
Lets start:
cd /usr/local/directadmin/custombuild
wget http://pecl.php.net/get/APC-3.1.13.tgz
tar xvzf APC-3.1.13.tgz
cd APC-3.1.13
/usr/local/php54/bin/phpize54
./configure --with-php-config=/usr/local/php54/bin/php-config54
make
make install
Now you will be presented with a message like this one
Installing shared extensions: /usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525/
Installing header files: /usr/local/php54/include/php/
Copy your shared extension file and edit php.ini with your favorite text editor
nano /usr/local/php54/lib/php.ini
Look for "extension_dir" (ctrl+w)
now uncomment the line if it is commented and paste your extension directory
it should look like
extension_dir = "/usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525/"
add under it (you can of course modify these values to your need):
extension=apc.so
apc.enabled=1
apc.shm_size=512M
apc.ttl=7200
apc.user_ttl=7200
apc.enable_cli=1
Save and close (ctrl+x)
Now restart PHP-FPM and apache
service php-fpm54 restart
service httpd restart
That's it. I hope it helped.
Last edited: