Tengine简介
Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。 —-tengine.taobao.org
Tengine特性
- 继承Nginx-1.17.3的所有特性,兼容Nginx的配置;
- 支持HTTP的CONNECT方法,可用于正向代理场景;
- 支持异步OpenSSL,可使用硬件如:QAT进行HTTPS的加速与卸载;
安装
依赖
shell> apt-get install build-essential libpcre3 libpcre3-dev libssl-dev libjemalloc-dev libatomic-ops-dev
用户创建
创建单独的用户和组,便于设置权限和安全
shell> groupadd www shell> useradd -s /sbin/nologin -g www -M www
编译安装
下载官方源码包后执行configure
shell> ./configure --user=www --group=www --with-jemalloc --with-libatomic --with-http_v2_module --with-http_realip_module shell> make shell> install
创建服务(Systemd)
[Unit] Description=The NGINX HTTP and reverse proxy server After=network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/usr/local/nginx/logs/nginx.pid ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=false [Install] WantedBy=multi-user.target