RPM Install the software into a non-default place
When installing, please specify the following options.
--relocate--badreloc
And you can generate server keys on the specified place if you use the following environment variable.
HCP_TOOLS_INSTDIR
Example:[user@localhost ~]$ sudo HCP_TOOLS_INSTDIR=/usr/local/hcp_tools rpm -ivh --relocate /=/usr/local/hcp_tools --badreloc hcpd-1.3.5-4.el9.x86_64.rpm
Since the following configuration files are still supposed to be placed on /usr or /etc, please change by yourself after this installation.
/usr/lib/systemd/system/hcpd.service/etc/pam.d/hcpd/etc/sysconfig/hcpd
When uninstalling, you just make it in a normal way with specifying package names.
Do not specify --relocate and --badreloc.
Example:[user@localhost ~]$ sudo HCP_TOOLS_INSTDIR=/usr/local/hcp_tools rpm -e hcpd
When commands are installed on non-default place, their help options (-V) shows the following information about the place.
[user@localhost sbin]$ ./hcpd -Vhcp server (hcpd) 1.3.5_4 / Linux (HpFP2 2.0.0.91_21 WSAPI 0.0.1.30 WS 4.2.0-1)Installed prefix: /usr/local/hcp_tools (/usr/local/hcp_tools/usr/sbin/hcpd)