ubuntu xcache howto

October 13th, 2011 | Tags: ,

XCache is a fast, stable  PHP opcode cacher that has been tested and is now running on production servers under high load. Install php5-xcache:

apt-get install php5-xcache

Configuration file is /etc/php5/conf.d/xcache.ini . Some of major config options:

extension=/usr/lib/php5/20090626/xcache.so - load xcache
xcache.admin.enable_auth = On - enable auth of admin page
xcache.admin.user = "UserName" - username
xcache.admin.pass = "ca34ew" - password, must be md5(password)
xcache.size = 256M - memory used for xcache
xcache.coverager = On - to enamble coverage
xcache.coveragedump_directory = /tmp

To enable xcache admin page, create file /etc/apache2/conf.d/xcache.conf

Alias /xcache-admin /usr/share/xcache/admin/

        Options Indexes FollowSymLinks
        DirectoryIndex index.php
        AllowOverride all
        Order allow,deny
        Allow from xxx.xxx.xxx.xxx

Restart apache, and go to http://mydomain.com/xcache-admin

To enable coverager, create file /etc/apache2/conf.d/xcache-cover.conf:

Alias /xcache-cover /usr/share/xcache/coverager/

        Options Indexes FollowSymLinks
        DirectoryIndex index.php
        AllowOverride all
        Order allow,deny
        Allow from xxx.xxx.xxx.xxx

Restart apache, and go to http://mydomain.com/xache-cover

No comments yet.