How do I install an RPM package into a different directory?
Q. How do I install an RPM package into a different directory like /home/chroot under RHEL / Fedora / CentOS Linux server?
A.An RPM package that can be installed into a different directory is said to be relocatable. The --prefix NEWPATH option is used for for relocatable binary packages. It translate all file paths that start with the installation prefix in the package relocation hint(s) to NEWPATH. For example, package bind-chroot or rsync or bash can be installed into another directory called /opt or /home/chroot. First find out whether a particular package is relocatable or not using rpm -qi command itself:
$ rpm -qi {package-name}
To install an RPM package into a diffrent directory type:
# rpm --prefix=/home/chroot/ bind-chroot*.rpm
To verify package file listing enter:
# rpm -ql bind-chroot
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Ubuntu Linux: How do I install .deb packages?
- Explain: Red Hat Linux RPM Relocatable and Not Relocatable Packages
- How do I install or upgrade an RPM file or package under Red Hat / Fedora / Suse Linux?
- How do I install and search FreeBSD ports or a package?
- What files are in a RPM package?
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: binary packages, fedora linux, Linux, Not Relocatable, relocations, rhel, rpm --prefix, rpm command, rpm packages



Recent Comments
Today ~ 3 Comments
Today ~ 57 Comments
Yesterday ~ 9 Comments
Yesterday ~ 7 Comments
Yesterday ~ 1 Comment