关于apc的理论网上很多,宅鸟不再做赘述:

直接上脚本:

#!/bin/bash# name:apc.sh# description:# author:lihuibin# version: 0.0.1# datetime: 2013-08-22 14:44:33# usage:apc.shwget http://pecl.php.net/get/APCmv APC APC-3.1.13.tgztar -zxvf APC-3.1.13.tgzcd APC-3.1.13//usr/bin/phpize./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/bin/php-configmakemake installcd /etc/php5/conf.d/cat > apc.ini << EOFextension=apc.so[apc]apc.enabled=1apc.shm_segments=1apc.shm_size=30Mapc.ttl=7200apc.user_ttl=3600apc.stat =1apc.stat_ctime = 0apc.max_file_size = 1MEOF/etc/init.d/php5-fpm reload