Steps to install Zend Opcache on a DirectAdmin server

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

root@learntut custombuild# php -m | grep -i zend


Zend OPcache


[Zend Modules]


Zend OPcache

 

Or you can also check as

root@learntut custombuild# php -v

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


          
        

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.