How can I change the installation location?

I want to install Couchbase 2.1.1 on Linux and it seems very difficult to get it to install anywhere other than /opt/couchbase.

The problem is that /opt on our servers isn’t large enough, and me have a large /disk2 partition that we want to install it on.

  • I tried the --prefix flag to rpm, but it tells me that the package isn’t relocatable.
  • In 1.8.1 days, I tried to just symlink /opt/couchbase to /disk2/couchbase, but the install didn’t like that and blew the link away and installed in /opt anyway.
  • As a workaround (in 1.8.1), we removed /opt and symlinked it to /disk2, but that isn’t always possible because there are sometimes things already installed in /opt.

What other options do I have for getting this into a better location for our servers?

Hmm, I think I answered my own question. In 2.1.1, it appears you can do the following:

rpm --install --relocate /opt/couchbase=/disk2/couchbase couchbase-server...rpm

The --prefix option will tell you it isn’t relocatable, but actually using --relocate will work.

Also you can mount the same disk to /opt/couchbase

Also you can mount the same disk to /opt/couchbase

Can we relocate the install location with yum install?