Installation of Xcache from source code

XCache is a fast, stable PHP opcode cacher. This relatively new opcode caching software has been developed by mOo. XCache optimizes performance caching the compiled state of PHP scripts into the RAM and uses the compiled version straight from the RAM. This may increase php execution 1-5 times faster than default installation. The XCache is useful when your websites have page load time issue. I think we all were faced/are facing the same problem while browsing high traffic websites most times. Here is the solution for that by caching the already executed files and and uses the executed one when we recall the same from browser again.

How can enable Xcache in a cPanel server?

You can simply enable it by running easyapache.

Installation steps from source code.

1. You can download the source code from Here


2. Extracting file.

tar -zxvf xcache-2.0.1.tar.gz

3. change directory to xcache-2.0.1

cd xcache-2.0.1 phpize ./configure –enable-xcache make make install

Now edit php.ini and add following extension.

Restart apache and you will see XCache enabled.

service httpd restart

How to check if XCache is installed or not in a server?

It is simple to find out if the Xcache is installed or not in the server. Here I am explaining some commandline usages to findout the same.

Option – I

php -m | grep -i xcache

Sample output:

# php -m|grep -i xcache
XCache Cacher
XCache Cacher

Option – II

php -v|grep -i xcache

Sample output:

# php -v|grep -i xcache
    with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo

Alternatively you can create an info.php on your server website document root using following text and access from web browser

<?php phpinfo(); ?>

Thats it!

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial