How to install XCache

XCache Installation:

  1. Download the latest compatible version and extract:
    # cd /usr/local/src && wget && tar -xzf xcache-1.3.2.tar.gz && cd xcache-1.3.2
  2. Note the path returned for the following command:
    # whereis php-config
  3. Use the output from #2 to modify the –with-php-config flag in the following compile command:
    # phpize && ./configure --with-php-config=/usr/bin/php-config --enable-xcache --enable-xcache-optimizer --enable-xcache-coverager && make && make install

    The result should be similar to:

    Installing shared extensions: /usr/lib/php/modules/
  4. You can also use the eaccelerator.ini file we prepared for you:
    # cp /var/www/vhosts/ /etc/php.d/
  5. Restart apache when ready:
    # /etc/init.d/httpd restart
  6. You’re done! XCache should now be available. If the following command retuns anything, you’re all set:
    # php -r 'phpinfo();' | grep 'xcache'