This url will download the latest version:http://pecl.php.net/get/ZendOpcache
cd /usr/local/src wget http://pecl.php.net/get/ZendOpcache tar xvfz zendopcache-7.x.x.tgz cd zendopcache-7.x.x phpize whereis php-config # set the path below ./configure --with-php-config=/usr/local/bin/php-config make make install # note the install path because you will use it below vi /usr/local/lib/php.ini
Paste this under your extension_dir
zend_extension=/FULL PATH FROM ABOVE/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
Restart Apache and see if it installed correctly
service httpd restart php -v
You should see something like:
PHP 5.4.16 (cli) (built: Jun 18 2013 04:13:41) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.2, Copyright (c) 1999-2013, by Zend Technologies