Linux安裝PHP加速器Xcache

來源:互聯網
上載者:User

標籤:http   os   io   ar   for   檔案   div   cti   代碼   

Linux安裝PHP加速器Xcache

XCache 是一個又快又穩定的 PHP opcoolcode 緩衝器. 經過良好的測試並在大流量/高負載的生產機器上穩定運行. 經過(在linux 上)測試並支援所有現行 PHP 分支的最新發行版本, 如 PHP_4_3 PHP_4_4 PHP_5_0 PHP_5_1 PHP_5_2 HEAD(6.x), 並支援安全執行緒/Windows. 與同類 opcoolcode 緩衝器相比更勝一籌, 比如能夠快速跟進 PHP 版本.下面介紹如何安裝配置。
1、安裝xcache

  1. wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
  2. tar -zxvf xcache-1.3.2.tar.gz
  3. cd xcache-1.3.2
  4. phpize
  5. ./configure --enable-xcache
  6. make
  7. make install

2、配置xcache
開啟php.ini檔案,增加如下代碼:

  1. [xcache-common]
  2. ; change me - 64 bit php => /usr/lib64/php/modules/xcache.so
  3. ; 32 bit php => /usr/lib/php/modules/xcache.so
  4. zend_extension = /usr/lib64/php/modules/xcache.so
  5.  
  6. [xcache.admin]
  7. xcache.admin.auth = On
  8. xcache.admin.user = "mOo"
  9. ; xcache.admin.pass = md5($your_password)
  10. xcache.admin.pass = ""
  11.  
  12. [xcache]
  13. xcache.shm_scheme =        "mmap"
  14. xcache.size  =               32M
  15. xcache.count =                 1
  16. xcache.slots =                8K
  17. xcache.ttl   =              3600
  18. xcache.gc_interval =         300
  19.  
  20. ; Same as aboves but for variable cache
  21. ; If you don‘t know for sure that you need this, you probably don‘t
  22. xcache.var_size  =            0M
  23. xcache.var_count =             1
  24. xcache.var_slots =            8K
  25. xcache.var_ttl   =             0
  26. xcache.var_maxttl   =          0
  27. xcache.var_gc_interval =     300
  28.  
  29. ; N/A for /dev/zero
  30. xcache.readonly_protection = Off
  31.  
  32. xcache.mmap_path =    "/dev/zero"
  33.  
  34. xcache.cacher =               On
  35. xcache.stat   =               On

注意修改zend_extension = /usr/lib64/php/modules/xcache.so為正確的路徑。
詳情的配置說明:http://xcache.lighttpd.net/wiki/XcacheIni

 

轉載請標明文章來源:《https://www.centos.bz/2011/10/linux-install-php-accelerator-xcache/》

Linux安裝PHP加速器Xcache

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.