PHP安裝Xcache擴充

來源:互聯網
上載者:User

標籤:gre   cal   test   admin   shm   manage   webroot   auth   安全執行緒   

簡述

XCache 是一個又快又穩定的 ?PHP opcode 緩衝器. 經過良好的測試並在大流量/高負載的生產機器上穩定運行. 經過(在 linux 上)測試並支援所有現行 ?PHP 分支的最新發行版本, 如 PHP_5_1 PHP_5_2 PHP_5_3 PHP_5_4. 並完美支援安全執行緒/Windows. 與同類 opcode 緩衝器相比更勝一籌。

 

Linux下擴充安裝:

1,產生靜態庫

wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gztar zxvf xcache-3.2.0.tar.gzcd xcache-3.2.0phpize./configure --with-php-config=/usr/local/php/bin/php-config --enable-xcache --enable-xcache-coverager --enable-xcache-optimizermake & make install

 2,配置php.ini

#vi /usr/local/php/lib/php.ini#添加以下內容[xcache-common]extension=xcache.so[xcache.admin]xcache.admin.enable_auth=Onxcache.admin.user="(系統管理使用者名)"xcache.admin.pass="(MD5格式化後的密碼)"[xcache]xcache.shm_scheme="mmap"xcache.mmap_path="/tmp/xcache"xcache.readonly_protection=Offxcache.size=64Mxcache.count=1xcache.slots=8kxcache.ttl=3600xcache.gc_interval=300xcache.test=Offxcache.readonly_protection=Onxcache.coredump_directory=""xcache.cacher=Onxcache.stat=Onxcache.optimizer=Onxcache.var_size=4Mxcache.var_count=1xcache.var_slots=8kxcache.var_gc_interval=300xcache.var_ttl=0xcache.var_maxttl=0

[xcache.coverager]xcache.coverager=Onxcache.coveragedump_directory=""

3,複製xcache內建管理工具到網站根目錄

#複製到網站根目錄下cp -R ./htdocs /var/webroot/#重新命名mv /var/webroot/htdocs /var/webroot/xcache_manager

 4,重啟fpm

ps -aux |grep fpmkill -USR2 xxx

phpinfo();看到Xcache即安裝成功,你可以訪問localhost/xcache_manager來管理查看xcache狀態。

 

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.