Installation, PHP

How to install APC for php in linux server

How to install APC for php in linux server

pecl install php
 

You can use the below steps to install it manually.

wget http://pecl.php.net/get/APC
tar -zxf APC-3.1.9.tgz
cd APC-3.1.9
whereis php-config
./configure --enable-apc --enable-apc-mmap --with-apxs--with-php-config=/usr/bin/php-config
make
make install
restart the apche
/etc/init.d/httpd restart
 
 
If you are getting below error message :
/root/tmp/pear/APC/apc.c:454: error: 'apc_regex' has no member named 'preg'
then you have to intall php-devel on server.
you can check the php-devel packages using the below command.
yum list php-devel
Once it will show the packages then you can install it using the below command.
yum install php-devel