Updating to nginx 0.8.54 and nginx upload module 2.2.0 on Fedora 8Edit

$ wget http://www.grid.net.ru/nginx/download/nginx_upload_module-2.2.0.tar.gz \
       http://nginx.org/download/nginx-0.8.54.tar.gz \
       http://nginx.org/download/nginx-0.8.54.tar.gz.asc
$ gpg --keyserver wwwkeys.pgp.net --recv-keys 0xA524C53E # first time only
$ gpg --verify nginx-0.8.54.tar.gz.asc nginx-0.8.54.tar.gz
$ tar xzvf nginx-0.8.54.tar.gz
$ tar xzvf nginx_upload_module-2.2.0.tar.gz
$ cd nginx-0.8.54
$ ./configure --prefix=/usr/nginx --with-http_ssl_module --add-module=../nginx_upload_module-2.2.0
$ make

Now we gracefully update the binary in place without dropping any existing connections (see "Updating to a new nginx binary on the fly" for more details).

The first step is to get the PID of the old nginx master process — in this example it is 17998 — and then perform the update in place by sending the appropriate signals to that process:

$ ps auxww | grep nginx
$ sudo -s
# make install
# kill -s USR2 17998  # advise old master process to start a new master process using updated binary
# kill -s WINCH 17998 # gracefully shut down old worker processes
# kill -s QUIT 17998  # exit old master process