Previously OPCache was know as Zend Optimizer+. PHP 5.5 introduced opcace caching into the core via OPCache. OPCache is also available as an extension through pecl, and is compatible all the way back to PHP 5.2.
In this article I will show you how to install Opcache on CentOS 7.
How does Opcache work?
Each time a PHP script is requested, the PHP script will be parsed and compiled into opcode which at that point is executed in the Zend Engine. This is the thing that enables PHP designers to avoid the assemblage step required in different languages like Java or C# — you can roll out improvements to your PHP code and see those progressions quickly. Be that as it may, the parsing and arranging steps increment your response time, and in a non-improvement condition are frequently pointless, since your application code changes occasionally.
Opcache Installation
First of all you have to install EPEL and REMI repository on your system because Remi’s packages depends on some EPEL packages. Follow the below link to install the both repository on your system.
- How to Install and Enble EPEL Reposity on CentOS, Fedora and RHEL
- How to Install and Enable REMI Repository on CentOS ,Fedora and RHEL
Next install yum-utils which contain yum-config-manager that will be helpful to enable repo.
# yum -y install yum-utils
Once yum-utils installed on your system. Lets go to enable php 5.6 the repository.
# yum-config-manager --enable remi-php56
Now proceed to update php to 5.6
# yum update -y Verify that php is update using below command.
# php -v
Now restart your web server and check that all sites are functional.
# service httpd restart
Next, it is time to install php OPCache using below command.
# yum -y install php-opcache
Now again restart your web server to apply the changes.
# service httpd restart
If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.
There is definitely ɑ great deal to find out about thiѕ topic.
I like all the points you haѵe made.
There is definitely a lot to leɑrn about this subject.
I just like all the guidelines you gave.