Instructions for installing and configuring Zend OPcache

Tutorials 0 lượt xem
This post is part 5 of 7 in the LEMP for CentOS 7 series

After you have installed WordPress using LEMP on CentOS 7 , you need to speed up your website. 

One of the popular techniques is to use Zend OPcache.

As you know PHP code must go through the process of interpreting before running.

Thanks to ZendOPcache, PHP code can be executed without reinterpreting. As a result, the processing speed of the website will be faster.

If you have followed our LEMP articles up to this point, we have installed the ZendOPcache module.

You can refer back to the PHP 7.1 installation section .

We use the command php-fmp -v to see the installed Zend Opcache:

install zend opcache on centos 7

For it to work optimally you need to add the following to the end of the /etc/php.ini file: ​

opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

Restart php-fpm: systemctl restart php-fpm

To monitor the status of Zend Opcache you can use the Opcache plugin or use the web viewer opcache-uig by amnuts. Check out other tools. 

How to install: 

cd /home/nginx/khamphaso.com/public_html
wget https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -O opcache-gui.php

Access the path :http://yourdomain.com/opcache-gui.php you will see the following: 

install zend opcache on centos 7 1

Good luck. 

View articles in the series

Previous Part: How to Install WordPress on CentOS 7 Next Part: How to Install Memcached on CentOS 7

Bài viết liên quan