redhat/centos系统下将rpm包安装到指定目录

2026-02-14 15:28:38

1、比如安装xxx.rpm包,以relocate 参数进行安装,安装到/opt/temp目录:

rpm -ivh --relocate /=/opt/temp xxx.rpm;

以prefix进行安装:

rpm -ivh --prefix= /opt/temp  xxx.rpm

猜你喜欢