Relocatable installations

Hello,

Is it possible to compile nginx such that installations can be moved?
For instance, say we install nginx to /tmp/original/nginx:

./configure --prefix=/tmp/original/nginx
make
make install

And we then move the installation directory to /tmp/relocated/nginx:

mv /tmp/original/nginx /tmp/relocated/nginx

Is there a way to run nginx in its new directory as though it had been
installed there directly, using either compile- or run-time options?

Thanks

Mike

Is there a way to run nginx in its new directory as though it had been
installed there directly, using either compile- or run-time options?

You can use the -p switch after ‘nginx’ binary to change the default
install
time prefix (and/or -c for different path for config file).

./nginx -p /tmp/relocated/nginx

http://wiki.nginx.org/CommandLine

rr

Is there a way to run nginx in its new directory as though it had been
installed there directly, using either compile- or run-time options?

You can use the -p switch after ‘nginx’ binary to change the default
install time prefix (and/or -c for different path for config file).

Aha! That seems to be what I’m looking for. Not sure how I missed that
– I think I must have been expecting it to be a compile-time option
rather than a run-time option.

Thanks for pointing it out.

Mike

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs