Nginx 1.20.0<—>1.20.1升级回滚实操
准备好待升级的Nginx执行文件并对原Nginx执行文件做好备份,本例中nginx/nginx.old是1.20.0,nginx.new是1.20.1。
[root@test01 sbin]# ll
total 23868
lrwxrwxrwx. 1 root root 32 May 29 20:30 n -> /root/openresty/nginx/sbin/nginx
-rwxr-xr-x. 1 root root 8144640 Nov 9 10:32 nginx
-rwxr-xr-x. 1 root root 8143536 Nov 5 15:06 nginx.new
-rwxr-xr-x. 1 root root 8144640 Nov 5 16:06 nginx.old
[root@test01 sbin]# nginx -v
nginx version: nginx/1.20.0
启动nginx1.20.0并测试工作正常
[root@test01 sbin]# nginx
[root@test01 sbin]# curl test -I
HTTP/1.1 200 OK
Server: nginx/1.20.0
Date: Tue, 09 Nov 2021 02:32:42 GMT
Content-Type: text/html
Content-Length: 620
Last-Modified: Wed, 23 Jun 2021 06:31:52 GMT
Connection: keep-alive
ETag: “60d2d558-26c”
Accept-Ranges: bytes
[root@test01 sbin]# ps -ef | gr