nginx环境下 XCache安装配置
2009-08-05 10:43
423 查看
XCache安装配置
一、下载下载地址:http://xcache.lighttpd.net/wiki/Release-1.2.2
二、安装模块
tar zxvf xcache-1.2.2.tar.gz
cd xcache-1.2.2
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config –enable-xcache –enable-xcache-optimizer
make
make install
三、算出密码的MD5字串(管理时会用到)
echo -n “123456″ | md5sum
四、配置XCache
vi /usr/local/php/etc/php.ini
在末尾添加
[xcache-common]
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;zend_extension = xcache.so
[xcache.admin]
; Change xcache.admin.user to your preferred login name
xcache.admin.user = “xcache”
; Change xcache.admin.pass to the MD5 fingerprint of your password
; Use md5 -s “your_secret_password” to find the fingerprint
xcache.admin.pass = “e10adc3949ba59abbe56e057f20f883e”
[xcache]
; Change xcache.size to tune the size of the opcode cache
xcache.size = 256M
xcache.shm_scheme = “mmap”
; cpu number (cat /proc/cpuinfo |grep -c processor)
xcache.count = 8
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0
; Change xcache.var_size to adjust the size of variable cache
xcache.var_size = 8M
; cpu number (cat /proc/cpuinfo |grep -c processor)
xcache.var_count = 8
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.test = Off
xcache.readonly_protection = On
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 = “”
注意点:
zend_extension = 全路径(推荐)或者 extension= cache
重启nginx
正常load之后,
在phpinfo显出的信息内
Zend这快应该会加上XCache的内容
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with XCache v1.2.2, Copyright (c) 2005-2007, by mOo
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies大功告成
如果要WEB方式查看xcache状态
把源码下的admin拷贝到任意站点目录,然后访问,输入设定的user password,即可查看
相关文章推荐
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手冊)
- win平台安装配置Nginx+php+mysql 环境
- CentOS 7 安装php5.6,Nginx,Memcached环境及配置
- Linux环境下实现ansible的roles工具远程安装配置nginx
- Linux下安装php环境并且配置Nginx支持php-fpm模块
- 转:Nginx+Apache环境的安装与配置
- CentOS下安装和配置MySQL-JDK-Tomcat-Nginx(个人官网环境搭建手册)
- 在Ubuntu Server上源码安装OpenERP(odoo) 8.0,并配置wsgi和nginx运行环境
- 安装nginx并配置php环境
- LNMP环境搭建:Nginx安装、测试与域名配置
- Nginx+Python+uwsgi+Django的web开发环境安装及配置
- 第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置
- Nginx 教程一:在windows环境下的安装、配置、使用以及设置为windows服务自启动
- Nginx安装配置PHP(FastCGI)环境的教程
- CentOS6.3上安装与配置nginx+php+mysql环境
- 安装Nginx+Lua+OpenResty开发环境配置全过程实例
- 安装Nginx+Lua+OpenResty开发环境配置全过程实例
- mac下 home-brew安装及php,nginx环境安装及配置
- NGINX的原理、安装、配置以及使用tomcat在linux上搭载集群环境
- Centos6.5服务器环境搭建之安装Nginx以及Https访问方式的配置