Reserve the NVIDIA GH200 Grace Hopper™ Superchip at Vultr today.
This article is outdated and may not work correctly for current operating systems or software.
XCache is an open-source opcode cacher for PHP. In this tutorial, I'll explain how to install and configure XCache. I assume that you already have a web server with Apache and PHP installed.
You can install XCache with
apt-get install php5-xcache
Change your XCache settings to make it function properly. Open the following file with your favorite text editor:
If this file does not exist, try opening the following file:
You can find all settings and their functions on the official XCache website.
To verify that XCache has successfully been installed, execute:
You should see that XCache is now being used by PHP:
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
XCache features a built-in web-based control panel. In order to be able to access it, we need to generate an md5-encrypted password. We can do this by executing:
echo -n "password" | md5sum
password with the password you'd like to use.
Copy the md5-encrypted password, and open the XCache configuration file from step 2.
[xcache.admin] sections and remove the comments. Change the value of
xcache.admin.pass to your md5-encrypted password which you just generated.
Next, copy the
/usr/share/xcache/htdocs folder to a folder accessible from the web. You can now login to the XCache web-based control panel!
Finally, restart Apache. After it restarts, XCache will be fully functional:
service apache2 restart