Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了不少高级功能和特性。关于Tengine的详细信息能够浏览http://tengine.taobao.org/,nginx由于不能动态插入模块,因此每次有新模块功能加入时都须要从新编译,在tengine1.4以后就能够实现相似apache的动态插入模块的功能,也能够快速的安装第三方模块。 nginx
下载地址:http://tengine.taobao.org/download/tengine-1.4.2.tar.gz shell
实验环境:ubuntu12.10 apache
在安装tengine以前先安装好初始包环境: ubuntu
apt-get install build-essential apt-get install libpcre3 libpcre3-dev apt-get install libssl-dev apt-get install libgeoip1 libgeoip-dev解压源码包,进入后先用./configure --help查看,并非全部的模块均可以改成动态插入的,只有标记为shared的才能够。由于是实验性质的,因此我就多选了几个模块使用
./configure --with-http_geoip_module=shared --with-http_sub_module=shared --with-http_flv_module=shared --with-http_random_index_module=shared --with-http_access_module=shared --with-http_autoindex_module=shared --with-http_upstream_ip_hash_module=shared --with-http_upstream_least_conn_module=shared make make install默认安装在/usr/local/nginx目录下,启动nginx,使用nginx -m并看不到动态模块,由于还没插入,全部的模块都是static的。
默认的动态模块在modules目录里面,这时候可动态插入的模块尚未被加入配置文件,咱们能够手动加入nginx.conf中 服务器
dso { load ngx_http_access_module.so; load ngx_http_autoindex_module.so; load ngx_http_flv_module.so; load ngx_http_geoip_module.so; load ngx_http_random_index_module.so; load ngx_http_sub_filter_module.so; load ngx_http_upstream_ip_hash_module.so; load ngx_http_upstream_least_conn_module.so; }启动nginx后使用nginx -m就能够看到懂爱模块都被标记被shared
参考:http://tengine.taobao.org dom