FreeBSD: Install PHP xcache Opcode Cacher
2009-05-13 15:22:59来源:未知 阅读 ()
Q.How do I install and configure
[url=javascript:;]xcache[/url]
under
[url=javascript:;]FreeBSD[/url]
operating systems for
[url=javascript:;]Apache[/url]
,
[url=javascript:;]lighttpd[/url]
or ngnix web server?
[/url]
A.XCache is a fast, stable
[url=javascript:;]php
opcode cacher that has been tested and now running on production server under high load.
[/url]
FreeBSD install xcache
xcache can be installed using FreeBSD
[url=javascript:;]ports
system or pkg_add command itself. First, update ports tree:
# portsnap fetch update
Install xcache, enter:
# cd /usr/ports/www/xcache
# make install clean
Enable xache
To enable xcahce copy the /usr/local/share/examples/xcache/xcache.ini config file into /usr/local/etc/php/ and modify it to suit your needs, enter:
# cp /usr/local/share/examples/xcache/xcache.ini /usr/local/etc/php/
# cd /usr/local/etc/php/
# vi xcache.ini
Set xcache.size and other parameters as per your requirements. Here is my sample xcache for FreeBSD 7 with quad core CPU and 4GiG RAM:
[xcache-common]
extension = xcache.so
[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "admin"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""
[xcache]
; ini only settings, all the values here is default unless explained
; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size = 512M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 4
; just a hash hints, you can always store count(items) > slots
xcache.slots = 8K
; ttl of the cache item, 0=forever
xcache.ttl = 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 0
; same as aboves but for variable cache
xcache.var_size = 128M
xcache.var_count = 1
xcache.var_slots = 8K
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- OpenBSD 4.5 2009-05-13
- DragonFly BSD 2.2.1发布 2009-05-13
- NetBSD 5.0发布 2009-05-13
- Introducing NetBSD 5.0 by Andrew Doran 2009-05-13
- Flash 9 for FreeBSD 7.1 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash