Example - Install RPM To A Different Location Or Directory

December 31, 2012 | By
| Reply More

So lets focus on rpm installation in a specific directory, well , for that to happen, rpm package should be relocatable, means if that package is flexible enough to be installed in different direction as provided by user or its hard coded, examples are like bash shell package or flash packages, which may not be relocatable.

[root@localhost ~]# rpm -qpi /home/redhat/Downloads/flash-plugin-11.2.202.238-release.i386.rpm
Name : flash-plugin Relocations: (not relocatable)
Version : 11.2.202.238 Vendor: Adobe Systems Inc.
Release : release Build Date: Fri 10 Aug 2012 06:45:38 PM PDT
Install Date: (not installed) Build Host: frbld_lnx_016.macromedia.com
Group : Applications/Internet Source RPM: flash-plugin-11.2.202.238-release.src.rpm
Size : 18383579 License: Commercial
Signature : (none)
Packager : Adobe Systems Inc.
URL : http://www.adobe.com/downloads/
Summary : Adobe Flash Player 11.2
Description :
Adobe Flash Plugin 11.2.202.238
Fully Supported: Mozilla SeaMonkey 1.0+, Firefox 1.5+, Mozilla 1.7.13+

So the above package is not relocatable and it can’t be installed in custom location.

You can also try below command to find whether the package is relocatable

#rpm –qi [package_name] | grep Relocations

If the package is relocatable it might show in the output as below

Name : keyutils-libs Relocations: /opt

Install package to different directory

If the package is relocatable, it can be installed to a different location.

#rpm --prefix=/mnt gnome-backgrounds-2.28.0-2.el6.noarch.rpm

Filed Under : LINUX HOWTO

Tagged With :

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.