Centos 6.2下php-5.2.17安裝配置XCache3加速器

 wget http://xcache.lighttpd.net/pub/Releases/3.0.0/xcache-3.0.0.tar.gz

 
tar zxvf xcache-3.0.0.tar.gz
 
cd xcache-3.0.0
 
/usr/local/php-5.2.17/bin/phpize
 
./configure -with-php-config=/usr/local/php-5.2.17/bin/php-config -enable-xcache -enable-xcache-coverager -enable-inline-optimization -disable-debug
 
make 
make install
 
 
vi /usr/local/php-5.2.17/etc/php.ini
在文件末尾添加:
extension = "xcache.so" #你的安裝路徑
xcache.admin.auth = On
xcache.admin.user = "xcache"
xcache.admin.pass = "5f4dcc3b5aa765d61d8327deb882cf99"  #password  is password
xcache.size         = 32M
xcache.shm_scheme   = "mmap"
xcache.count        = 4
xcache.slots        = 8K
xcache.ttl          = 0
xcache.gc_interval  = 0
xcache.var_size     = 16M
xcache.var_count    = 1
xcache.var_slots    = 8K
xcache.var_ttl      = 0
xcache.var_maxttl   = 0
xcache.var_gc_interval =     300
xcache.test         = Off
xcache.readonly_protection = Off
xcache.mmap_path    =   "/dev/zero"
xcache.coredump_directory =   ""
xcache.cacher       = On
xcache.stat         = On
xcache.optimizer    = Off
[xcache.coverager]
xcache.coverager    = On
xcache.coveragedump_directory = ""
 
拷貝htdocs到WWW目錄
cp -R htdocs  /data/www/wwwroot
cd /data/www/wwwroot/htdocs
cp config.example.php config.php
在文件末尾添加:
$_SERVER["PHP_AUTH_USER"] = "xcache";
$_SERVER["PHP_AUTH_PW"] = "password";
 
打開瀏覽器訪問http://10.0.0.17/htdocs,輸入帳號xcache 密碼password 進入
 
 

 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章