Skip to content

Instantly share code, notes, and snippets.

@ckng
Created April 9, 2014 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckng/10243417 to your computer and use it in GitHub Desktop.
Save ckng/10243417 to your computer and use it in GitHub Desktop.
Ubuntu: Zend OPcache install
# Install "pecl" via php-pear
$ sudo apt-get install -y php-pear
# Install build dependencies
$ sudo apt-get install -y build-essential php5-dev
# Install Zend OpCache
$ sudo pecl install zendopcache-7.0.3
# 12.04
$ sudo vi /etc/php5/conf.d/opcache.ini
zend_extension=/usr/lib/php5/20090626/opcache.so
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
$ sudo service php5-fpm restart
# verify
$ php -v
PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr 4 2014 01:30:04)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
@vladkras
Copy link

I would not recommend use opcache.enable_cli=1 stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment