A relocatable RPM package can change its installation path during the setup process. Not all RPM packages can be installed into a custom directory. Use the following command to see if a specific package can be relocated.
# rpm -qpi <rpm package> | grep Relocations
# rpm -qpi redhat-lsb-1.3-3.1.EL3.i386.rpm | grep Relocations Name : redhat-lsb Relocations: (not relocatable) # rpm -qpi rsync-2.5.7-5.3E.i386.rpm | grep Relocations Name : rsync Relocations: /usr
According to the aforementioned instances, rsync is relocatable, but the centos-lsb package is not. This means that you can use the rpm option --prefix to install the rsync package into a separate directory, such as /opt:
# rpm -ivh --prefix=/opt rsync-2.5.7-5.3E.i386.rpm
# rpm -ql rsync /etc/xinetd.d/rsync /opt/bin/rsync /opt/share/doc/rsync-2.5.7 /opt/share/doc/rsync-2.5.7/COPYING /opt/share/doc/rsync-2.5.7/README /opt/share/doc/rsync-2.5.7/tech_report.tex /opt/share/man/man1/rsync.1.gz /opt/share/man/man5/rsyncd.conf.5.gz
Purchase Dedicated Servers
Select, configure, and buy!