How to install APC

ARUN Post in INSTALLATION
0

wget http://pecl.php.net/get/APC

tar -zxf APC
cd APC-3.0.16
phpize
whereis php-config
OUTPUT WILL BE LIKE :
php-config: /usr/bin/php-config /usr/share/man/man1/php-config.1.gz
./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/bin/php-config
make
make install
php -i | grep php.ini
cp -ar /usr/local/lib/php.ini /usr/local/lib/php.ini.bak
vi /usr/local/lib/php.ini
Any where after "extension_dir" insert
extension=apc.so
NOTE :
While I tried to install there was an error about pcre, so I installed pcre an pcre-devel
yum install pcre
yum install pcre-devel
After the installation check if apc.so is present under the php extension_dir
To get the extension_dir path use
php -i | grep extension_dir

If its not present copy apc.so to the extension_dir
ERROR

make apc.lo error 1 error make' failed
Solution :  yum install pcre-devel
vi /etc/php.d/apc.ini
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=1024
apc.ttl=0
apc.user_ttl=7200
apc.num_files_hint=0
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.cache_by_default=1
apc.include_once_override=1
« Prev: :Next »

Leave a Reply

You must be logged in to post a comment.