標籤彙整: php-fpm

安裝 APC (Alternative PHP Cache)

apt-get install php-pear php5-dev libpcre3-dev make
pear upgrade
pecl install apc

apc安裝時會問一些問題,我都按照它預設的回答。

 

vi /etc/php5/conf.d/apc.ini

新增 apc.ini

[apc]
extension=apc.so
; enable APC
apc.enabled=1
; The number of shared memory segments
apc.shm_segments=1
; The size of each shared memory segment
apc.shm_size=64M
; The number of seconds a cache entry is allowed to idle in a slot in case this
; cache entry slot is needed by another entry.
apc.ttl=7200

 

重新啟動載入新設定

service php5-fpm restart

 

寫個php來看看APC有沒有安裝成功

<?php
	phpinfo();
?>

有出現apc就代表成功了,詳細設定還沒研究。