How to Install XCache on Debian 5.0.x 64bit DirectAdmin installed

#1. Get Xcache 1.3.2 (lated Release : xcache.lighttpd.net/pub/Releases)

cd /tmp
wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
tar xvzf xcache-1.3.2.tar.gz

#2. Use phpize command to prepare xcache as a PHP extension for compiling

cd /tmp/xcache-1.3.2
phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519

#3. Configure, compile and install XCache

./configure --enable-xcache
make
make install
..
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

*Notice that the location of file extension is : /usr/local/lib/php/extensions/no-debug-non-zts-20060613/

#**Install Xcache Panel

mv admin /var/www/html/xcache

and create MD5 Password(www.adamek.biz/md5-generator.php) for config xcache.

#4. Enable extension and also create configuration

cat xcache.ini >> /usr/local/lib/php.ini

or

All document I found said you need to create xcache.ini. However, I did a bit different, I just merge xcache.ini into php.ini

vim /usr/local/lib/php.ini

Put following configuration in php.ini

[xcache-common]
;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
zend_extension_ts = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;; For windows users, replace xcache.so with php_xcache.dll
;zend_extension_ts = c:/php/extensions/php_xcache.dll
;; or install as extension, make sure your extension_dir setting is correct
; extension = xcache.so
;; or win32:
; extension = php_xcache.dll

[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""

[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =               60M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =              3600
xcache.gc_interval =         300

; Same as aboves but for variable cache
; If you don't know for sure that you need this, you probably don't
xcache.var_size  =            4M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

; N/A for /dev/zero
xcache.readonly_protection = Off

xcache.mmap_path =    "/dev/zero"

xcache.cacher =               On
xcache.stat   =               On

Make sure that [xcache-common] and its content come before [Zend] or you will get an error about incompatibility something like that.

#5. Restart httpd service

/etc/init.d/httpd restart

After restart, type php-v. You will see that XCache is installed

php -v
PHP 5.2.14 (cli) (built: Oct 14 2010 19:26:50)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with XCache v1.3.0, Copyright (c) 2005-2009, by mOo

refer: http://xcache.lighttpd.net/wiki/InstallFromSource


# Xcache 3.1.0

cd /tmp
wget http://xcache.lighttpd.net/pub/Releases/3.1.0/xcache-3.1.0.tar.gz
tar zvxf xcache-3.1.0.tar.gz
cd xcache-3.1.0
phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
./configure --enable-xcache
make
make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
cat xcache.ini >> /usr/local/lib/php.ini #edit path xcache & set admin
cp -a htdocs /var/www/html/
mv /var/www/html/htcocs /var/www/html/xcache
chown webapps:webapps /var/www/html/xcache -R
mv /var/www/html/xcache/config.default.php /var/www/html/xcache/config.php

~/htdocs/cacher/mkpassword.php

test

ab -c 10 -n 100 http://www.taxze.com/

 September 23, 2010

 Blog | # # #

qrcode
Facebook Facebook X / Twitter Twitter Telegram Telegram Pinterest Pinterest Email Email

Re-commend-เด็ด ๆ ต่อจาก How to Install XCache on Debian 5.0.x 64bit DirectAdmin installed

  • Magicz?~