Install Zend OPcache in DirectAdmin

Zend OPcache is basically a modern PHP script caching module which helps to accelerate the PHP performance on the server. It gives a faster PHP execution through Opcode caching and optimization. It also improves the performance of PHP by storing the pre-compiled script code in the shared memory of the server.

 

This pre-compiled script codes will terminate reading the code from the disk and executing it on future accessing. Zend OPcache will also apply some code optimization pattern which helps to execute the code faster than the normal.

 

Install Zend OPcache

1) SSH to the server as root user.

2) Enter into the custom build directory. Which is located below.

# cd /usr/local/directadmin/custombuild

3) Set the OPcache to Yes.

# ./build set opcache yes

Now you will get an output as follows.

[root@user custombuild]# ./build set opcache yes

Changed opcache option from no to yes.

4) Run the below command to execute the OPcache module.

# ./build opcache

while executing, you will get an output like as follows.

[root@user custombuild]# ./build opcache

opCache 7.0.5 is now installed for PHP 5.5.

opCache 7.0.5 PHP extension has been installed successfully.

5) We can check that the OPcache is listing correctly in different ways.

Here I’m listing some of the commands to verify the same.

[root@user /]# 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

 

or

 

[root@user /]# php -m | grep -i zend

Zend Opcache

[Zend Modules]

Zend Opcache

 

or

 

[root@user /]# php -v | grep -i zend

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

with Zend OPcache v7.2.10, Copyright (c) 1998-2015, by Zend Technologies

 

Also, we can check it by creating a phpinfo.php page and check it from a browser.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What virtualization software do you use?

We use Parallels Virtuozzo Containers (PVC).

Why is my VPS constantly crashing?

There are several causes to why you may not be able to access your VPS. Some users often mistake...

What kind of support do you offer?

We offer Fully Managed VPS packages. For a list of items that we support, please refer to the...

What kind of software can I install on my VPS?

As you have full root access, you may install any compatible software on your VPS. However, any...

What is Virtuozzo?

Virtuozzo is the VPS technology created by SWsoft which allow us to create isolated VPS servers...