[Linux笔记]Directadmin安装XCache教程[适合SuPHP]

2 Comments

安装Directadmin一般会安装eAccelerator做PHP加速。但是最新版PHP所支持的eAccelerator0.9.6.x已经去掉cache功能,Discuz不支持使用。搜索了N多资料,找不到针对Directadmin安装XCache的教程,那就自己写一个吧。

cd /usr/local/src/
wget http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz
tar -zxvf xcache-2.0.1.tar.gz
cd xcache-2.0.1
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/php5/bin/phpize
./configure --enable-xcache -with-php-config=$PHP_PREFIX/php5/bin/php-config
make && make install


最后修改PHP.INI[DirectAdmin的SuPHP模式安装的在/usr/local/etc/php5/cgi]
将以下内容加到ZEND上面:

[xcache-common]
zend_extension = /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/xcache.so
[xcache.admin]
xcache.admin.user = "admin"
xcache.admin.pass = ""
; xcache.admin.pass = md5($your_password)
xcache.admin.enable_auth = On
[xcache]
xcache.cacher =               On
xcache.size  =               64M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =              3600
xcache.gc_interval =         300
xcache.var_size  =            0M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300
xcache.readonly_protection = Off
xcache.mmap_path =    "/dev/zero"

最后

service httpd restart

完成

2 Thoughts on “[Linux笔记]Directadmin安装XCache教程[适合SuPHP]

回复 象牙塔

您的电子邮箱地址不会被公开。 必填项已用 * 标注