In this tutorial we will show you how to install and configuration of XCache on your Ubuntu 15.04 server. 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.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation XCache on Ubuntu 15.04 server.
Install XCache on Ubuntu 15.04
Step 1. First of all make sure that all packages are up to date.
Step 2. install XCache.
Installing XCache is as simple as running just one command:
apt-get install php5-xcache
Now verify that the extension is available by using the following command:
php -m | grep XCache
Your result should be similar to:
At this point xCache should be successfully installed on your server. You can confirm that by executing the following command:
### php -v
PHP 5.6.4 (cli) (built: Jul 24 2015 00:46:99)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo
Congratulation’s! You have successfully installed XCache. Thanks for using this tutorial for installing XCache for php in Ubuntu 15.04 system. For additional help or useful information, we recommend you to check the official PHP web site.