For those of you who didn’t know, XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce server load. In this tutorial we will show you how to install xCache on a CentOS.
Install XCache for PHP on CentOS
Step 1. First add EPEL yum repository your system.
xcache.size = 32M
xcache.ttl = 3600
;Ifyoudon't know for sure that you need this, you probably don't
xcache.var_size = 0M
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.stat = On
You can modify the settings in the xcache.ini file according to your needs. Detailed explanation about these settings you can find at the xCache official wesbsite.
Step 4. Restart your Nginx web server.
At this point xCache should be successfully installed on your server. You can confirm that by executing the following command:
Congratulation’s! You have successfully installed XCache for PHP. Thanks for using this tutorial for installing XCache in CentOS system. For additional help or useful information, we recommend you to check the official XCache web site.