Tengine-2.3.2---->Tengine-2.3.3
#下载与解压新版本
cd /tmp/
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
tar xf tengine-2.3.3.tar.gz
#进入后编译安装
cd tengine-2.3.3/
#你这都升级了,指定有www-data用户和组吧,没有就去看我的上一篇
./configure --prefix=/usr/local/tengine-2.3.3 --user=www-data --group=www-data --with-threads --with-http_v2_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_stub_status_module --add-module=modules/ngx_http_upstream_session_sticky_module --add-module=modules/ngx_http_upstream_check_module --with-stream --with-stream_ssl_module
make
make install
#文件夹结构
cd /usr/local/
[root@local]# ll
lrwxrwxrwx 1 root root 24 Jun 20 2020 nginx -> /usr/local/tengine-2.3.2
lrwxrwxrwx 1 root root 13 Jul 15 2019 nginx1 -> tengine-2.3.1
drwxr-xr-x 12 root root 186 Jun 20 2020 tengine-2.3.1
drwxr-xr-x 13 root root 202 Jan 28 2022 tengine-2.3.2
drwxr-xr-x 6 root root 54 Sep 7 09:28 tengine-2.3.3
#修改权限
chown www-data:www-data /usr/local/tengine-2.3.3/ -R
#同步证书与其他配置文件夹
注:具体同步哪些文件夹,参考新旧tengine文件夹
cp -a tengine-2.3.2/2022ssl tengine-2.3.3/
cp -a tengine-2.3.2/client_body_temp/ tengine-2.3.3/
cp -a tengine-2.3.2/fastcgi_temp/ tengine-2.3.3/
cp -a tengine-2.3.2/proxy_temp/ tengine-2.3.3/
cp -a tengine-2.3.2/scgi_temp/ tengine-2.3.3/
cp -a tengine-2.3.2/uwsgi_temp/ tengine-2.3.3/
cp -a tengine-2.3.2/vhosts/ tengine-2.3.3/
cp -a tengine-2.3.2/conf/ tengine-2.3.3/
#重新创建软链接
mv nginx nginx2
ln -s /usr/local/tengine-2.3.3/ nginx
#重启Tengine
systemctl restart nginx
#查看状态
systemctl status nginx
#如果报错"Failed to read PID from file /run/nginx.pid: Invalid argument"
mkdir -p /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf
systemctl daemon-reload
systemctl restart nginx.service
#查看版本与配置
nginx -v
nginx -t
#注意
对比主从节点conf文件夹与vhost文件夹内容是否一致,不一致需要同步
#可用性测试
停止主节点的keepalived,测试是否切换到从节点,从节点是否可用