– APC(Alternative PHP Cache) 설치
APC를 다운로드 후 설치를 진행합니다.

http://pecl.php.net/package/APC

[[email protected] ~]# cd /usr/local/src
[[email protected]~]# wget http://pecl.php.net/get/APC-3.1.3p1.tgz
[[email protected] ~]# tar xzvf APC-3.1.3p1.tgz
[[email protected] ~]# cd APC-3.1.3p1
[[email protected] ~]# /usr/local/php5/bin/phpize
[[email protected] ~]# ./configure –enable-apc –with-php-config=/usr/local/php5/bin/php-config
[[email protected] ~]# make && make install

Installing shared extensions:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/

[[email protected] ~]# ls -l /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613 | grep apc
-rwxr-xr-x 1 root  wheel  542184  1 25 02:54 apc.so


php.ini 파일에 아래 내용을 추가 합니다.

[[email protected] ~]# vi /usr/local/apache2/conf/php.ini

[APC]
extension_dir=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
extension=apc.so
apc.mode=shm
apc.file_md5=1
apc.ttl=3600
apc.idle=900
apc.hash_buckets=256
apc.max_file_size=1024
apc.cachedir=/tmp
apc.mmap_file_mask=/tmp/apc.XXXXXX


아파치를 재시작 후
phpinfo 를 이용하여 APC를 확인합니다.

[[email protected] ~]# /usr/local/apache2/bin/apachectl restart

[[email protected] ~]# echo ‘<?php phpinfo(); ?>’ >
/var/www/html/phpinfo.php