How to force RPM to install files in a single directory, Is it possible?

Jasper picture Jasper · Dec 6, 2012 · Viewed 37.7k times · Source

rpm install command, installs files all over the place like: /usr/bin, /usr/sbin, /etc/, /usr/share

This way it's hard to figure out all the contents of the installation. Is it possible to force rpm to install everything in a single directory?

Answer

phschoen picture phschoen · Dec 6, 2012

you can use the --relocate to change 1 directory of the install process

rpm -i --relocate /usr/sbin=/some/other/path/sbin packagename.rpm

or use --prefix for the whole installation process

rpm  -i --prefix=/some/other/path/ packagename.rpm