APCのインストール

http://it.kndb.jp/entry/show/id/482 さんより


#phpizeとapxsのインストール
$yum install php-devel http-devel

#APCをDL→展開
#http://pecl.php.net/package/apc から最新を。
$ wget APCのファイル
$ tar -zxvf APCのDLしたファイル
$ cd APCの展開したディレクト
$ phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025

$ .configure --enable-apc
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
  〜〜〜中略〜〜〜

checking whether stripping libraries is possible... yes
configure: creating ./config.status
config.status: creating config.h

$ make install
$ vi /usr/local/etc/php/extension.ini
/bin/sh /root/APC-3.0.15/libtool --mode=compile gcc -I. -I/root/APC-3.0.15 -DPHP_ATOM_INC -I/root/APC-3.0.15/include -I/root/APC-3.0.15/main -I/root/APC-3.0.15 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O
 
        〜〜〜中略〜〜〜

See any operating system documentation about shared libraries for
more information, such as the ld[1] and ld.so[8] manual pages.

                                                                                                                                          • -

Installing shared extensions: /usr/lib/php/modules

#php.iniの最下行に設定追記
#viで最下行に行くには"Shift"+"g"
$vi /etc/php.ini


extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
[apc]
extension=apc.so
apc.enabled=1
apc.optimization=1
apc.ttl=10
apc.gc_ttl=10