tengine 安装和配置
安装:
cd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
tar -xzf tengine-2.3.3.tar.gz
cd tengine-2.3.3.tar.gz
./configure
make
make install
nginx -t #检查配置文件
nginx -v #查看安装好的版本
nginx -m #查看已安装的模块
systemctl enable nginx
systemctl start nginx
tengine 的配置语法与nginx完全兼容,可直接使用
注意:tengine-2.3.1 之后的版本默认没有开启 ngx_http_upstream_check_module 模块
该模块在Tengine-1.4.0版本以前没有默认开启,它可以在配置编译选项的时候开启:./configure --with-http_upstream_check_module
但是在1.4.0之后编译时默认开启的,但是在2.3.1版本时候默认取消了,需要以增加模块方式编译进去
增加模块的方法:
比如增加 modules/ngx_http_upstream_check_module 和 ngx_http_upstream_consistent_hash_module 模块
./configure --add-module=./modules/ngx_http_upstream_check_module/ --add-module=./modules/ngx_http_upstream_consistent_hash_module
所有可增加的模块都在源码包的 modules 目录
nginx -m #检查已安装的模块