Table of Contents
- Step 1: Installing XCache
- Step 2: Changing settings
- Step 3: Verifying XCache installation
- Step 4: Enabling the XCache control panel
- Step 5: Restarting Apache
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.
Step 1: Installing XCache
You can install XCache with
apt-get install php5-xcache
Step 2: Changing settings
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.
Step 3: Verifying XCache installation
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
Step 4: Enabling the XCache control panel
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!
Step 5: Restarting Apache
Finally, restart Apache. After it restarts, XCache will be fully functional:
service apache2 restart
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!