XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is supported on all of the latest PHP. 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.
To install follow the steps mentioned below.
1. Download and extract the source for XCache .
$ cd /usr/local/src/
$ tar -xzvf xcache-1.2.2.tar.g
Build, configure and install theXCache module.
$ phpize
$ ./configure –enable-xcache
$ make && make install
You can see a message like this . Note theextension directory.
Build complete.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
Now configure the php.ini file ( To find .ini file, use the command `php -i | grep php.ini`)
Replace the following line in php.ini with correct path ,which describes the Installed shared extensions that we noted above.
zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
It will become like this,Now configure the php.ini file ( To find .ini file, use the command `php -i | grep php.ini` )
Restart apache and confirm theXcache installation.
$php -v