下载APC
根据提示只能安装3.1.13版本
wget http://pecl.php.net/get/APC-3.1.13.tgztar -zxvf APC-3.1.13.tgz && cd APC-3.1.13 phpize ./configure --enable-apc --enable-apc-mmap --enable-apc-spinlocks --disable-apc-pthreadmutex --with-php-config=/usr/bin/php-config make && make install
配置APC
编辑/etc/php.ini
extension=apc.so
[APC]
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
重启php查看信息
systemctl restart php-fpm