Centos6.2下php-5.2.17安裝配置XCache3加速器

科技小能手發表於2017-11-12

 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 進入
 
 

 
 
本文轉自 ppabc  51CTO部落格,原文連結:http://blog.51cto.com/ppabc/1051971


相關文章