php-apc 安装

351 查看

wget-c http://pecl.php.net/get/APC-3.1.13.tgz
tar-zvxf APC-3.1.13.tgz
cdAPC-3.1.13

编译安装:
复制代码 代码如下:

wget-c http://pecl.php.net/get/APC-3.1.13.tgz
/usr/local/php/bin/phpize
./configure--enable-apc --enable-mmap --enable-apc-spinlocks --disable-apc-pthreadmutex --with-php-config=/usr/local/php/bin/php-config
make
sudomake install

修改php.ini加入:
复制代码 代码如下:

extension= "apc.so" ;
;APCsetting
apc.enabled= 1
apc.shm_segments= 1
apc.shm_size= 64M
apc.optimization= 1
apc.num_files_hint= 0
apc.ttl= 0
apc.gc_ttl= 3600
apc.cache_by_default= on

重启apache或者/usr/local/php/sbin/php-fpmrestart