Blog > Hosting Articles > How to install xCache from source

How to install xCache from source

Running a caching solution on your VPS or dedicated server can squeeze a few extra users on it before you’ll have to upgrade to more expensive hardware, and should reduce load times for visitors. A total win-win situation for all involved.

wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
tar -zxf xcac-*.tar.gz
cd xcache
phpize
./configure --enable-xcache
make
make install
cat xcache.ini >> /etc/php.ini

Line 1. This gets the xcache files needed for install. Currently at version 1.2.2
Line 2. This untars the package
Line 3. Switches you to the xCache directory
Line 4. Lets you install xCache without recompiling php
Line 5. Sets configuration options
Line 6. Prepares it for install
Line 7. Installs
Line 8. Adds the default xCache configuration options to your php.ini file. (Note: If your php.ini file is in a different location do a ‘locate php.ini’ to find it)

After you’ve installed it you’ll need to change php.ini to ensure everything is okay.

nano /etc/php.ini

Make sure that ‘zend_extension=../../xcache.so’ appears before all other ‘zend_extension=….’ or else you’ll have problems.

Just for good measure, restart php and apache to ensure nothing fails. Enjoy your new optimized caching server!

Not what you're looking for? Try these reviews instead:

  1. How to install APC Cache (Latest Version) In 10 Steps

Leave a Review

Don't forget to rate it!