1. 下载安装包
wget -c http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
2. 解压
tar -zxvf tengine-2.3.3.tar.gz
3. 检查配置
cd tengine-2.3.3
./configure
3.1. 异常处理
异常1
checking for C compiler ... not found
./configure: error: C compiler cc is not found
也就是c编译器 gcc找不到
安装gcc
yum -y install gcc
异常2:
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
缺少pcre和pcre-devel 安装
yum -y install pcre pcre-devel
这里安装好后 可以通过
Rpm -qa | grep pcre找到所有pcre的包
Rpm -ql 完整包名 查看安装的路径
异常3:
checking for OpenSSL library ... not found
缺少openssl和openssl-devel 安装
yum -y install openssl openssl-devel
继续检测成功 可以从日志看到 需要pcre openssl zlib(安装openssl自动安装)的库
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for OpenSSL library ... found
checking for zlib library ... found
creating objs/Makefile
4. 安装(安装目录:/usr/local/nginx)
make && make install