Skip navigation

Monthly Archives: Agustus 2014


Just another snippet. By using Chef’s PHP cookbook, we can easily install Zend Opcache. That if we still use PHP 5.4 since 5.5. have the opcache in the default distribution.

Put this in the recipe

php_pear "opcache" do
  package_name "ZendOpcache"
  action :install
  preferred_state "beta"
  zend_extensions ["opcache.so"]
  directives node['php']['opcache']['directives']
end

and this in the attributes

default['php']['opcache']['directives'] = {
    'memory_consumption' => 128,
    'interned_strings_buffer' => 8,
    'max_accelerated_files' => 4000,
    'revalidate_freq' => 60,
    'fast_shutdown' => 1,
    'enable_cli' => 1,
    'save_comments' => 0,   
}
Iklan
%d blogger menyukai ini: