nginx学习笔记

本文介绍了如何配置Nginx以绑定虚拟目录,并详细说明了启动Nginx的方法。此外,还提供了安装XCache的步骤,包括下载、编译、配置等关键环节。

一.绑定虚拟目录

 location /help/ {

        alias /usr/share/;

         autoindex on;  /*可以看虚拟目录里的内容,默认为off*/

}

二。启动nginx方法

/usr/local/webserver/php/bin/spawn-fcgi -a 127.0.0.1 -p 10080 -C 64 -u www -f /usr/local/webserver/php/bin/php-cgi具体看自己的环境

然后执行

ulimit -SHn 51200
/usr/local/webserver/nginx/sbin/nginx -c /usr/local/webserver/nginx/conf/nginx.conf

 

三.安装xcache(安装xcache以前必须安装phpize yum install -y php-devel就可以了)

~/src $ wget http://... (the release url)
~/src $ tar -zxf xcache-*.tar.gz
~/src $ cd xcache
~/src/xcache $ phpize
~/src/xcache $ ./configure --enable-xcache --enable-xcache-coverager

~/src/xcache $ make
~/src/xcache $ su
~/src/xcache # make install
~/src/xcache # cat xcache.ini >> /etc/php.ini
(it's two > not one)

(now edit /etc/php.ini with your favorite editor)
~/src/xcache # $EDITOR /etc/php.ini
(make sure zend_extension=../../xcache.so is the first before any other zend_extension=***)

此处,--enable-xcache 选项包含 XCache 支持,--enable-xcache-coverager 选项包含用于测量加速器功效的附加特性。要启用操作码优化,添加 --enable-xcache-optimizer


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值