How to install XCache in PHP on CentOS linux

Started by Aalesund, January 12, 2015, 12:13:04 PM

Previous topic - Next topic

Aalesund

By default XCache is not installed.
Now I'll show you how to install it.

1. Install additional required dev packages
yum install gmp gmp-devel

2. Download and decompress (latest version -> http://xcache.lighttpd.net/)
wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz
tar -xvzf xcache-3.2.0.tar.gz

3. Compile XCache
cd xcache-3.2.0
/usr/local/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/bin/php-config
make
make install
cp xcache.ini /usr/local/php/php.d/xcache.ini

4. Restart httpd and check results
service httpd restart
php -v

You should see this:
PHP 5.4.27 (cli) (built: Jan 11 2015 15:58:09)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
    with the ionCube PHP Loader v4.7.3, Copyright (c) 2002-2014, by ionCube Ltd.
    with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo


Administrator

this will not work with suPHP handler and you will need to use Varnish as a cache server in front of the apache

http://www.webhostingtalk.com/showthread.php?t=1211457