Tengine由淘宝团队开发,是Nginx的一个分支,它继承了Nginx的高性能和稳定性,同时添加了一些新的功能和优化

tengine

tengine-(淘宝定制的nginx)

#部分依赖包作用
     zlib        //gzip压缩
     openssl     //ssl
     pcre        //地址重写rewite

#pcre

#zlib

#openssl

1.编译pcre

tar zxf pcre2-10.23.tar.gz

./configure
make && make install

# or yum安装
yum install -y pcre pcre-devel

--with-http_rewrite_module   //模块属于默认编译的,故不需要再次添加!

tengine默认编译的模块

./configure
make && make install

[root@mvp nginx]# ./sbin/nginx -m
Tengine version: Tengine/2.2.0 (nginx/1.8.1)
nginx: loaded modules:
nginx:     ngx_core_module (static)
nginx:     ngx_errlog_module (static)
nginx:     ngx_conf_module (static)
nginx:     ngx_dso_module (static)
nginx:     ngx_events_module (static)
nginx:     ngx_event_core_module (static)
nginx:     ngx_epoll_module (static)
nginx:     ngx_procs_module (static)
nginx:     ngx_proc_core_module (static)
nginx:     ngx_openssl_module (static)
nginx:     ngx_regex_module (static)
nginx:     ngx_http_module (static)
nginx:     ngx_http_core_module (static)
nginx:     ngx_http_log_module (static)
nginx:     ngx_http_upstream_module (static)
nginx:     ngx_http_static_module (static)
nginx:     ngx_http_autoindex_module (static)
nginx:     ngx_http_index_module (static)
nginx:     ngx_http_auth_request_module (static)
nginx:     ngx_http_auth_basic_module (static)
nginx:     ngx_http_access_module (static)
nginx:     ngx_http_limit_conn_module (static)
nginx:     ngx_http_limit_req_module (static)
nginx:     ngx_http_geo_module (static)
nginx:     ngx_http_map_module (static)
nginx:     ngx_http_split_clients_module (static)
nginx:     ngx_http_referer_module (static)
nginx:     ngx_http_rewrite_module (static)
nginx:     ngx_http_ssl_module (static)
nginx:     ngx_http_proxy_module (static)
nginx:     ngx_http_fastcgi_module (static)
nginx:     ngx_http_uwsgi_module (static)
nginx:     ngx_http_scgi_module (static)
nginx:     ngx_http_memcached_module (static)
nginx:     ngx_http_empty_gif_module (static)
nginx:     ngx_http_browser_module (static)
nginx:     ngx_http_user_agent_module (static)
nginx:     ngx_http_upstream_hash_module (static)
nginx:     ngx_http_upstream_ip_hash_module (static)
nginx:     ngx_http_upstream_consistent_hash_module (static)
nginx:     ngx_http_upstream_check_module (static)
nginx:     ngx_http_upstream_least_conn_module (static)
nginx:     ngx_http_upstream_keepalive_module (static)
nginx:     ngx_http_upstream_dynamic_module (static)
nginx:     ngx_http_stub_status_module (static)
nginx:     ngx_http_write_filter_module (static)
nginx:     ngx_http_header_filter_module (static)
nginx:     ngx_http_chunked_filter_module (static)
nginx:     ngx_http_range_header_filter_module (static)
nginx:     ngx_http_gzip_filter_module (static)
nginx:     ngx_http_postpone_filter_module (static)
nginx:     ngx_http_ssi_filter_module (static)
nginx:     ngx_http_charset_filter_module (static)
nginx:     ngx_http_userid_filter_module (static)
nginx:     ngx_http_footer_filter_module (static)
nginx:     ngx_http_trim_filter_module (static)
nginx:     ngx_http_headers_filter_module (static)
nginx:     ngx_http_upstream_session_sticky_module (static)
nginx:     ngx_http_reqstat_module (static)
nginx:     ngx_http_copy_filter_module (static)
nginx:     ngx_http_range_body_filter_module (static)
nginx:     ngx_http_not_modified_filter_module (static)

nginx参数

[root@VM_0_2_centos sbin]# ./nginx -h
Tengine version: Tengine/2.1.2 (nginx/1.6.2)
Usage: nginx [-?hvmVtdq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:  

-?,-h         : this help  

-v            : show version and exit  

-m            : show all modules and exit  

-l            : show all directives and exit  

-V            : show version, modules and configure options then exit  

-t            : test configuration and exit   //测试默认nginx.conf配置文件

-d            : dump configuration and exit  

-q            : suppress non-error messages during configuration testing  

-s signal     : send signal to a master process: stop, quit, reopen, reload  //信号控制nginx的状态

-p prefix     : set prefix path (default: /servyouapp/nginx/)  

-c filename   : set configuration file (default: conf/nginx.conf)               //非默认配置文件

-g directives : set global directives out of configuration file  //非默认目录