How to install XCache to accelerate PHP performance

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 serverload.

The XCache project is lead by mOo who is also a developer of Lighttpd. Lighttpd is one of the fastest webserver programs and outperforms Apache and many other open source webserving projects so the same is being done to XCache.

How to Install XCache for PHP

First we have to enable epel repository

After enabling epel repository issue the below command

To install on Ubuntu issue the below command

How to Configuring of XCache for PHP

RHEL/CentOS/Fedora

Debian/Ubuntu/Linux Mint

For the configuration options please refer to the URL : http://xcache.lighttpd.net/wiki/XcacheIni

Restart Apache for XCache

After configuring XCache we need to restart apache.

Verifying XCache

Output

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply