Updating to nginx 0.7.64 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.64.tar.gz
$ tar xzvf nginx-0.7.64.tar.gz 
$ cd nginx-0.7.64
$ ./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 31662 — 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 31662
$ sudo kill -s WINCH 31662
$ sudo kill -s QUIT 31662

See also