「PHP入門」LinuxでAPC3.0.19(Alternative PHP Cache)をソースパッケージからインストールする

システム要件:
OS:Linux
PHP5.4.24

1.APCのインストール
wget http://pecl.php.net/get/APC-3.0.19.tgz
tar xzvf APC-3.0.19.tgz
/usr/local/webserver/php/bin/phpize
./configure –enable-apc –enable-apc-mmap –with-php-config=/usr/local/webserver/php/bin/php-config –prefix=/usr/local/apc
make && make install

2.php.iniを設定
[apc]
extension=apc.so ;
apc.enabled = 1 ;(apc有効1,0禁止)
apc.cache_by_default = on ;(File cache
apc.shm_segments = 1 ;(共有メモリブロック)
apc.shm_size = 64 ;(共有メモリサイズ)
apc.ttl =0 ;(Time To Live nothing will be removed until the entire cache becomes full)
apc.gc_ttl = 7200 ;(The number of seconds that a cache entry may remain on the garbage-collection list)
apc.num_files_hint = 0 ;(number of distinct user cache variables to store. Set to zero or omit if not sure)

3.apcについて
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

PHP

Posted by arkgame