1 2 3 4 5 6 7 8 9 10 |
apt-get install php-apc apc apc.shm_size=256M cp /etc/php.d/apc.ini /home/rack && sed -i 's/^.*apc.shm_size=.*$/apc.shm_size=256M/' /etc/php.d/apc.ini && grep "apc.shm_size=" /etc/php.d/apc.ini cp /usr/share/doc/php*apc*/apc.php /var/www/ service httpd graceful && service httpd status |
PHP5.5 -> If it has Zend OPcache it doesn’t need APC anymore
1 |
php -m |
Look for this:
1 2 |
[Zend Modules] Zend OPcache |
GUI: https://github.com/amnuts/opcache-gui
1 |
wget https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php |
/etc/php5/mods-available/opcache.ini or /etc/php5/fpm/conf.d/05-opcache.ini
1 2 3 4 5 6 |
opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1 |