How To Install Alternative PHP Cache For Linux

php

APC is a great operation code caching system for PHP that can help speed up your site.

To install APC packages with the following command:


cd /usr/local/src/
wget http://pecl.php.net/get/APC-3.1.9.tgz
tar zxvf APC-3.1.9.tgz
cd APC-3.1.9.tgz
phpize
./configure –enable-apc –enable-apc-mmap –with-apxs=/usr/bin/apxs –with-php-config=/usr/bin/php-config
make
make install

The latest version of APC can be obtained from http://pecl.php.net/package/APC

Then proceed to add the following to the local php.ini:


extension=”apc.so”
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128


About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.
Posted in Linux