How can I change the installation location?

#1

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?

#2

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.

#3

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

#4

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