搜尋
首頁php教程php手册php5.3.28安装加速缓存xcache

刚刚把eAccelerator换成APC也坚持不了多久,运行了一天就完蛋了, php 502错误,php-fpm卡住罢工!当php-fpm进程异常退出的时候其他进程无法获取 apc 的互斥锁。导致死锁。这次继续搜索apc资料,有人提到惠新宸(apc维护者之一)他建议不要再使用apc,建议换

刚刚把eAccelerator换成APC也坚持不了多久,运行了一天就完蛋了,php502错误,php-fpm卡住罢工!当php-fpm进程异常退出的时候其他进程无法获取apc的互斥锁。导致死锁。这次继续搜索apc资料,有人提到惠新宸(apc维护者之一)他建议不要再使用apc,建议换成opcache,php5.3用不了哈。

这次试试国产xcache

wget -c http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz
tar zxvf xcache-3.2.0.tar.gz
cd xcache-3.2.0
/usr/local/php/bin/phpize
./configure –enable-xcache –enable-xcache-coverager –enable-xcache-optimizer –with-php-config=/usr/local/php/bin/php-config
make
make install

安装成功后,在php.ini配置文件尾部里面加入以下

xcache.admin.pass这里的管理密码需要32位的,随便找个网站生成下。
xcache.count 这里是cpu几核

;xcache
[xcache-common]
extension = xcache.so

[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = “admin”
;run: echo -n “yourpassword” |md5sum |awk ‘{print $1}’ to get md5 password
xcache.admin.pass = “c8e1118e1e8429ebabc79b3d910cb7a0″

[xcache]
xcache.shm_scheme =??????? “mmap”
xcache.size? =?????????????? 128M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count =???????????????? 8
xcache.slots =??????????????? 8K
xcache.ttl?? =???????????????? 0
xcache.gc_interval =?????????? 0
xcache.var_size? =??????????? 4M
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
; for *nix, xcache.mmap_path is a file path, not directory. (auto create/overwrite)
; Use something like “/tmp/xcache” instead of “/dev/*” if you want to turn on ReadonlyProtection
; different process group of php won’t share the same /tmp/xcache
xcache.mmap_path =??? “/dev/zero”
xcache.coredump_directory =?? “”
xcache.experimental =??????? Off
xcache.cacher =?????????????? On
xcache.stat?? =?????????????? On
xcache.optimizer =?????????? Off

[xcache.coverager]
; enabling this feature will impact performance
; enable only if xcache.coverager == On && xcache.coveragedump_directory == “non-empty-value”
; enable coverage data collecting and xcache_coverager_start/stop/get/clean() functions
xcache.coverager =????????? Off
xcache.coveragedump_directory = “”
;xcache end

重启php即可,输出echo phpinfo(); 查看是否成功!

这时候需要运行管理它,在xcache-3.2.0目录下的htdocs管理代码目录拷贝到可以运行的虚拟主机下,直接运行即可。

其它配置的详细解说看xcache.lighttpd.net

有问题请留言^_^

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
3 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強大的PHP整合開發環境

Atom編輯器mac版下載

Atom編輯器mac版下載

最受歡迎的的開源編輯器

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用