Updating to nginx 0.7.62 on Red Hat Enterprise Linux 5.4Edit

Created , updated

Updating PCRE

We won’t update PCRE here because we don’t want to lose the automatic updates of the Red Hat-supplied version.

Updating nginx and using the nginx upload module

The nginx upload module was already in extracted in place (see "Installing nginx 0.7.62 on Red Hat Enterprise Linux 5.3") so we just download the updated nginx source and extract that alongside it:

$ wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
$ tar xzvf nginx-0.7.62.tar.gz 
$ cd nginx-0.7.62
$ ./configure --prefix=/usr/local/nginx --with-http_ssl_module --add-module=../nginx_upload_module-2.0.10
$ 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 2941 — and then perform the update in place by sending the appropriate signals to that process:

$ ps auxww|grep nginx
$ sudo make install
$ sudo kill -s USR2 2941
$ sudo kill -s WINCH 2941
$ sudo kill -s QUIT 2941

See also