• Uncategorized
  • 1

How to install Zend Opcache in a DirectAdmin server?

Before going to the installation tips, let’s see what is Zend Opcache.

It’s a modern PHP script caching module which accelerates the PHP performance. Zend Opcache provides faster PHP execution through Opcode caching and optimization. It improves the performance of PHP by storing the precompiled script byte-code in the shared memory. This eliminates reading the code from the disk and compiling it on future access. It also applies few byte-code optimization pattern which help to execute the code faster.

Installation steps

Here I’m explaining the installation steps with custombuild 2.0

Enter the custombuild directory

# cd /usr/local/directadmin/custombuild

Setting opcache to yes

# ./build set opcache yes

You’ll get a sample output as follows:

[root@crybit custombuild]# ./build set opcache yes
Changed opcache option from no to yes

Compiling Opcache module

# ./build opcache
[root@crybit 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:

You can check this in different ways. Please see the sample outputs pasted below:

[root@crybit /]# 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
[root@crybit /]# php -m | grep -i zend
Zend OPcache
[Zend Modules]
Zend OPcache

That’s it!!

Heba Habeeb

Working as a Linux Server Admin, Infopark, Cochin, Kerala.

You may also like...

1 Response

  1. david says:

    Hi, How do you edit the opcache settings. As it is not using the php.ini it seems to be using 10.directadmin.ini but when i edit values you doesnt update

Leave a Reply

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