Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Install Zend OPCache on Debian 7
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Install Zend OPCache on Debian 7

danitfkdanitfk Member

Hello fellows


I'm using Debian 7 with PHP 5.4.36-0+deb7u3 (cli) , How I can install Zend OPCache on this version of PHP ? :)

Thanks !

Comments

  • vldvld Member
    edited March 2015

    Install PHP >5.5. No reason not to, and it has opcache bundled.

  • Ok vld


    I did install the OPCache following these :


    Installing PHP-pear

    sudo apt-get install -y php-pear


    then dependencies

    sudo apt-get install -y build-essential php5-dev


    After I checkout latest version (Now It's 7.0.4) Installing the opcache.

    sudo pecl install zendopcache-7.0.4


    Find extension directory

    sudo find / -name 'opcache.so'


    Create config file for php

    nano /etc/php5/mods-available/opcache.ini'


    Add these stuff in file:

    zend_extension=/usr/lib/php5/20100525/opcache.so # File path from above 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


    Create a symlink for load this:

    sudo ln -s /etc/php5/mods-available/opcache.ini /etc/php5/conf.d/20-opcache.ini

    The end restart the apache or there is any php-fpm you must restart this too.

  • If you want to avoid to compile it yourself, is available in my repository, section "php".

    :)

Sign In or Register to comment.