[CentOS] yum --installroot and GPG key

Maciej Żenczykowski maze at cela.pl
Sat Sep 10 15:36:37 UTC 2005

> [root at machine ~]# yum --installroot=/data/xchg-2.0/ install apache2

> [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
> [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY
> [root at machine ~]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY
> [root at machine ~]# rpm --import 
> /usr/share/doc/centos-release-4/RPM-GPG-KEY-centos4

rpm also has a root parameter:
$ rpm --help | grep root
   -r, --root=ROOT                  use ROOT as top level directory 
(default: "/")

so you'd want to use "rpm -r /data/xchg-2.0/ --import ..."

however, you'll also need to install of apache's dependcies in this 
chroot directory, probably not exactly what you want...

you might also want to look at rpm's
   --prefix=<dir>                   relocate the package to <dir>, if
parameter (though I've never used it).


More information about the CentOS mailing list