Zend Opcache is basically a modern PHP script caching module which in reality helps accelerate the PHP performance. It improves the performance of PHP by storing the precompiled script byte-code in the shared memory. Doing this helps eliminate the process of reading the code from the disk and compiling it on future access, saving access time.There are also further optimization tweaks which Zend Opcache does but I am not diving into its details in this blog.
Steps to install Zend Opcache:
The steps I have mentioned is with reference to custombuild2.0
First, navigate to the custombuild directory.
Setting opcache to yes.
You’ll get a sample output as follows:
Changed opcache option from no to yes
Compiling Opcache module.
opCache 7.0.5 is now installed for PHP 5.5.
opCache 7.0.5 PHP extension has been installed successfully.
Now check if Opcache is correctly listing:
Now verify Zend Opcache is installed correctly by checking in a phpinfo page. Or you can test it directly by checking the php modules enabled via command line as below
Or you can also check as
PHP 5.5.36 (cli) (built: Jun 7 2016 05:59:15)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies