Итак, качаем APC-3.1.6.tgz и устанавливаем:

cd /usr/local/src
wget http://pecl.php.net/get/APC-3.1.6.tgz
tar -xvf APC-3.1.6.tgz
cd APC-3.1.6
yum install pcre-devel
phpize

ищем где няходиться php-config файл для установки APC

which php-config


продолжаем установку

./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/local/bin/php-config
make
make install

Тепер APC cache установлен на сервере и нужно только добавить APC extension в файл php.ini

php -i |grep php.ini

у меня это

/usr/local/lib/php.ini

и дописываем следующие настройки:

extension="apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=256
apc.ttl=3600
apc.user_ttl=7200
apc.num_files_hint=1024
apc.enable_cli=1

Рестартуем Apache

/etc/init.d/httpd restart

И проверяем или APC cache установлен нормально

php -i | grep apc

Должно вывести примерно такое:

Zend Guard Loader requires Zend Engine API version 220090626.
The Zend Engine API version 220060519 which is installed, is outdated.
 
apc
apc.cache_by_default => On => On
apc.canonicalize => On => On
apc.coredump_unmap => Off => Off
apc.enable_cli => On => On
apc.enabled => On => On
apc.file_md5 => Off => Off
apc.file_update_protection => 2 => 2
apc.filters => no value => no value
apc.gc_ttl => 3600 => 3600
apc.include_once_override => Off => Off
apc.lazy_classes => Off => Off
apc.lazy_functions => Off => Off
apc.max_file_size => 1M => 1M
apc.mmap_file_mask => no value => no value
apc.num_files_hint => 1024 => 1024
apc.preload_path => no value => no value
apc.report_autofilter => Off => Off
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.shm_segments => 1 => 1
apc.shm_size => 256 => 256
apc.slam_defense => On => On
apc.stat => On => On
apc.stat_ctime => Off => Off
apc.ttl => 3600 => 3600
apc.use_request_time => On => On
apc.user_entries_hint => 4096 => 4096
apc.user_ttl => 7200 => 7200
apc.write_lock => On => On