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.

root@learntut sed# cd /usr/local/directadmin/custombuild

Setting opcache to yes.

You’ll get a sample output as follows:

root@learntut custombuild# ./build set opcache yes

Changed opcache option from no to yes

Compiling Opcache module.

[root@learntut custombuild]# ./build opcache

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