Recompiling Nginx
You are right, make just do the linking and compilation, while make install will install it on the system
You don't need to have a downtime. You compile and replace the executable.Then you trigger nginx to spawn a new master.The process is explained here:http://nginx.org/en/docs/control.html#upgrade
New Version - Master - start:kill -s USR2 `cat /var/run/nginx.pid`Old Version - Worker - stop:kill -s WINCH `cat /var/run/nginx.pid.oldbin`Old Version - Master - stop:kill -s QUIT `cat /var/run/nginx.pid.oldbin`
If you want to go back to the older version:
Old Version - Worker - start:kill -s HUP `cat /var/run/nginx.pid.oldbin`New Version - Master - stop:kill -s QUIT `cat /var/run/nginx.pid`
If you get an error that the file cannot be replaced your compile options are wrong.
--sbin-path=/usr/sbin/nginx