Tengine特性
繼承Nginx-1.6.2的所有特性,兼容Nginx的配置;
動態模塊加載(DSO)支持。加入一個模塊不再需要重新編譯整個Tengine;
支持SO_REUSEPORT選項,建連性能提升爲官方nginx的三倍;
同時支持HTTP v2協議和SPDY v3協議,可同時使用兩種協議;
流式上傳到HTTP後端服務器或FastCGI服務器,大量減少機器的I/O壓力;
更加強大的負載均衡能力,包括一致性hash模塊、會話保持模塊,還可以對後端的服務器進行主動健康檢查,根據服務器狀態自動上線下線,以及動態解析upstream中出現的域名;
輸入過濾器機制支持。通過使用這種機制Web應用防火牆的編寫更爲方便;
支持設置proxy、memcached、fastcgi、scgi、uwsgi在後端失敗時的重試次數
動態腳本語言Lua支持。擴展功能非常高效簡單;
支持管道(pipe)和syslog(本地和遠端)形式的日誌以及日誌抽樣;
支持按指定關鍵字(域名,url等)收集Tengine運行狀態;
組合多個CSS、JavaScript文件的訪問請求變成一個請求;
自動去除空白字符和註釋從而減小頁面的體積
自動根據CPU數目設置進程個數和綁定CPU親緣性;
監控系統的負載和資源佔用從而對系統進行保護;
顯示對運維人員更友好的出錯信息,便於定位出錯機器;
更強大的防***(訪問速度限制)模塊;
更方便的命令行參數,如列出編譯的模塊列表、支持的指令等;
可以根據訪問文件類型設置過期時間;
Tengine安裝
下載地址:http://tengine.taobao.org/
yum -y install pcre-devel openssl-devel zlib-devel
./configure \
–prefix=/usr/local
–sbin-path=/usr/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log
–http-log-path=/var/log/nginx/access.log
–pid-path=/var/run/nginx.pid
–lock-path=/var/run/nginx.lock
–http-client-body-temp-path=/var/cache/nginx/client_temp
–http-proxy-temp-path=/var/cache/nginx/proxy_temp
–http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
–http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
–http-scgi-temp-path=/var/cache/nginx/scgi_temp
–user=nginx
–group=nginx
–with-http_ssl_module
–with-http_realip_module
–with-http_addition_module
–with-http_sub_module
–with-http_dav_module
–with-http_flv_module
–with-http_mp4_module
–with-http_gunzip_module
–with-http_gzip_static_module
–with-http_random_index_module
–with-http_secure_link_module
–with-http_stub_status_module
–with-http_auth_request_module
–with-threads
–with-stream
–with-stream_ssl_module
–with-http_slice_module
–with-file-aio
–with-http_v2_module
make && make install
參考博主文章,作爲個人學習之用
https://blog.51cto.com/xinzong/1772369