Installing XCache
XCache is an open-source opcode cacher for PHP. In this guide we’ll install and configure it. We assume you already have a web server running Apache and PHP.
1. Install XCache
You can install XCache with apt-get:
apt-get install php5-xcache
2. Adjust the settings
Open the following file in your text editor to configure XCache:
/etc/php5/mods-available/xcache.ini
If that file doesn’t exist, try this one instead:
/etc/php5/conf.d/xcache.ini
You’ll find every setting and option explained on the official XCache website.
3. Check that XCache is working
To confirm the installation, run:
php -v
You should see that PHP is now using XCache:
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo
4. Enable the XCache control panel
XCache has a built-in web control panel. To use it, you first need an MD5 hash of a password, which you can create with:
echo -n "password" | md5sum
Replace password with the password you want to use.
Copy the MD5 hash and open the XCache configuration file from step 2. Find the [xcache.admin] section, uncomment it, and set xcache.admin.pass to the hash you generated.
Next, copy the /usr/share/xcache/htdocs folder into a web-accessible directory. You can now sign in to the XCache web panel.
5. Restart Apache
Finally, restart Apache. Once it’s back up, XCache is fully working:
service apache2 restart
Thanks for reading this guide from Mizbandade.

