Changing Installation Location

How do you change the default installation location when installing Couchbase on Linux OS using an RPM?

Two commands didn’t work; is it impossible to change the default installation directory from /opt/couchbase to another location?

$ rpm -i couchbase-server-enterprise-7.2.0-rhel8.x86_64.rpm --relocate /opt/couchbase=/root/couchbase
path /opt/couchbase in package couchbase-server-7.2.0-5325.x86_64 is not relocatable

$ rpm -i couchbase-server-enterprise-7.2.0-rhel8.x86_64.rpm --prefix=/root/couchbase
Error: package couchbase-server is not relocatable

Additional Question :
Is it possible to install in /home/couchbase instead of /opt/couchbase? The directory ‘opt’ is not needed.

It seems to be not relocatable.

Did you try just moving the directory after installing? If that works without issue, then you have a solution. But it will not be supported.

Alternative : Use symbolic link

ln -s /root /opt
Then install product

1 Like