How to install packages to a custom location in centos6
the installroot tool is usefull for situations like installing packages into a chroot environment. try installing all the yum configuration and repo files into /tp
, keeping their respective paths, and your custom package installation will work. (eg: /tp/etc/yum.conf
).
in such a case /tp
will be prepended to any files that are read or written by yum. that includes configurations files, yum log files, repository information, etc.
From the rpm
man page:
--prefix NEWPATH
For relocatable binary packages, translate all file paths that
start with the installation prefix in the package relocation
hint(s) to NEWPATH.
--relocate OLDPATH=NEWPATH
For relocatable binary packages, translate all file paths that
start with OLDPATH in the package relocation hint(s) to NEWPATH.
This option can be used repeatedly if several OLDPATH's in the
package are to be relocated.