Installing xcache for PHP5 on Debian Etch

XCache is a fast, stable PHP opcode cacher that has been tested and is
now running on production servers under high load. It is tested (on
linux) and supported on all of the latest PHP cvs branches such as
PHP_4_3 PHP_4_4 PHP_5_0 PHP_5_1 PHP_5_2 HEAD(6.x). ThreadSafe/Windows
is also supported. It overcomes a lot of problems that has been with
other competing opcachers such as being able to be used with new PHP
versions. See Introduction for more information.

There is no XCache package within the apt repositories for Debian
Etch, however it is available within Debian SID/Testing. You will need
to then download the source, compile it and install it. You can
download the 1.2 stable source from the following here:

You will need to make sure that you have ?php5-devel? installed so
you can use ?phpize? to create the module, a simply ?apt-get install
php5-dev? as root should do the trick. You may need to type ?rehash? if
using tcsh to be able to run ?phpize?.

Now we need to prepare the module for configuration by typing the following:

[root@hostcolorpack:~/xcache-1.2.2]# phpize ?clean && phpize

[root@hostcolorpack:~/xcache-1.2.2]# ./configure

[root@hostcolorpack:~/xcache-1.2.2]# make

Once the module has been compiled it should now reside within the
?modules? directory. You can now copy to the proper PHP5 module
directory:

Now that the module exists, we need to make a configuration file for
it so that PHP5 will load the module and configuration. You should see
a ?xcache.ini? within the root folder of the extract archive. Just copy
it to the correct configuration folder within /etc:

/etc/php5/apache/conf.d <- Configuration file for PHP5 as a Module in apache1.3x
/etc/php5/apache2/conf.d <- Configuration file for PHP5 as a Module in apache2.x
/etc/php5/cgi/conf.d <- Configuration file for PHP5 compiled as a CGI Binary
/etc/php5/cli/conf.d <- Configuration file for PHP5 compiled as a Command Line Binary