Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。
官网:
http://tengine.taobao.org
1、编译安装 tengine-2.1.2
注意: 不支持CentOS8
#安装所需软件
[root@centos7 ~]#yum -y install gcc pcre-devel openssl-devel
#创建一个不登录的账号;
[root@centos7 ~]#useradd -r -s /sbin/nologin nginx
#切换到src目录,下载并解压tengine-2.1.2
[root@centos7 ~]#cd /usr/local/src
[root@centos7 src]#wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
[root@centos7 src]#tar xf tengine-2.1.2.tar.gz
#切换到tengine-2.1.2 开始编译
[root@centos7 src]#cd tengine-2.1.2/
[root@centos7 tengine-2.1.2]#./configure --prefix=/apps/tengine-2.1.2 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre #这里强烈建议手动输入;
[root@centos7 tengine-2.1.2]#make && make install
编译的脚本在这;
/configure --prefix=/apps/tengine-2.1.2 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre
#建立软链接 并启动nginx
[root@centos7 tengine-2.1.2]#ln -s /apps/tengine-2.1.2/sbin/* /usr/sbin/
[root@centos7 tengine-2.1.2]#nginx -v
[root@centos7 tengine-2.1.2]#nginx
[root@centos7 ~]#ss -tnl #可以看到80端口启动
ss -tnl
#在网页测试 ,安装已经完成;
2、在tengine-2.1.2中添加 lua 动态模块
#基于上一小节继续以下操作
[root@centos7 ~]#yum -y install lua-devel
[root@centos7 ~]#cd /usr/local/src/tengine-2.1.2
(以下编译文件还是建议手动输入;)
[root@centos7 tengine-2.1.2]#./configure --prefix=/apps/tengine-2.1.2 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-http_lua_module=shared
[root@centos7 tengine-2.1.2]#make dso_install
[root@centos7 tengine-2.1.2]#vim /apps/tengine-2.1.2/conf/nginx.conf
[root@centos7 tengine-2.1.2]#nginx -t
[root@centos7 tengine-2.1.2]#nginx -s reload
[root@centos7 tengine-2.1.2]#nginx -V |& grep share
3、编译安装 tengine-2.3.2
[root@centos8 ~]#yum -y install gcc pcre-devel openssl-devel
[root@centos8 ~]#useradd -r -s /sbin/nologin nginx
[root@centos8 ~]#cd /usr/local/src
[root@centos8 src]#wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
[root@centos8 src]#tar xvf tengine-2.3.2.tar.gz
[root@centos8 src]#cd tengine-2.3.2/
[root@Centos8 tengine-2.3.2]#./configure --prefix=/apps/tengine-2.3.2 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module
[root@centos8 tengine-2.3.2]#make && make install
编译脚本在这;
./configure --prefix=/apps/tengine-2.3.2 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module
执行查看安装结果;
建立软链接
[root@centos8 tengine-2.3.2]#ln -s /apps/tengine-2.3.2/sbin/* /usr/sbin/
查看版本并启动
[root@centos8 tengine-2.3.2]#nginx -v
Tengine version: Tengine/2.3.2
nginx version: nginx/1.17.3
[root@centos8 tengine-2.3.2]#nginx
在网页测试 安装完成