How to install Zend Opcache in a DirectAdmin server?

Zend Opcache

Zend Opcache on direct admin server installation, that’s the topic which we’re discussing here. 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.

How do I enable/disable Xcache via cPanel – CloudLinux

It’s very simple to mange PHP directives on a CloudLinux server as we’ve PHP selector on it. We already summarized this on the topic >> Introduction to CageFS and PHP Selector << We can simply manage this through cPanel >> Software/Services >> Select PHP Version.

Here I’m explaining the steps to enable/disable “Xcache” via cPanel for a particular account. The following directives must be there in “/etc/cl.selector/php.conf” file on the server to manage this feature via cPanel.

Zend Opcache 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:

[[email protected] custombuild]# ./build set opcache yes
Changed opcache option from no to yes

Compiling Opcache module

# ./build opcache
[[email protected] 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:

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

That’s it!!

The XCache – Simple way to install Xcache from source code

The XCache is useful when your websites have page load time issue. I think we all were faced/are facing the same problem while browsing high traffic websites most times. Here is the solution for that by caching the already executed files and and uses the executed one when we recall the same from browser again.

XCache is a fast, stable ​PHP opcode cacher that has been proven and is now running on production servers under high load. Read more…

Post navigation

Heba Habeeb

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

One thought on “How to install Zend Opcache in a DirectAdmin server?

  1. 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.