发布于 2015-12-08 22:55:47 | 269 次阅读 | 评论: 0 | 来源: PHPERZ

这里有新鲜出炉的Tengine官方文档,程序狗速度看过来!

Tengine 淘宝Web服务器

Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。


背景

Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。

Tengine作为阿里巴巴对nginx的分支,在国内外都有很高的声誉,其对nginx的一些功能扩展非常不错,比如jemalloc内存管理和lua语言支持,所以笔者准备在开发环境下使用。

准备

下载tengine-2.1.1pcre-8.3.7jemalloc
注意,请下载pcre而不是pcre2,两者是完全不同的。
还需要一个autoconf来让jemalloc能够生成configure文件,直接下载autoconf

./configure
make & make install

编译

进入tengine目录,然后输入以下命令

./configure --user=www-data --group=www-data --with-file-aio --with-ipv6 --with-mail --with-mail_ssl_module --with-pcre=/path/to --with-jemalloc=/path/to
make
make install

注:/path/to指向pcre和jemalloc的源代码目录。
--with-file-aio是只有在linux上才有用的


最新openssl推出的1.0.2更新,明确指出了openssl0.9.8和1.0.0版本已经不再维护,所以OS X编译安装openssl的时候必须自行下载openssl1.0.2的源代码然后自行编译,tengine可以通过--with-openssl命令指定openssl源代码目录,但是tengine只是通过makefile调用./config --prefix=/path/to no-shared no-threads命令来编译openssl,openssl本身在OS X下编译是有问题的,不能使用./config命令配置,必须通过./Configure darwin64-x86_64-cc手动配置,所以想要tengine使用x64的库必须手工修改objs/Makefile最后面

- && ./config --prefix=/path/to no-shared  no-threads \
+ && ./Configure --prefix=/path/to no-shared  no-threads darwin64-x86_64-cc \


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务