Get the installation location

Hello Team,

Can we change the installation loaction of couchbase from /opt/couchbase to some other location ?
If yes then how ?
Can we get the location of installed couchbase via some command or some config file ?

I believe this is what you’re looking for: Non-Root Install and Upgrade | Couchbase Docs

I’m not sure about getting the installed location…what would you be looking to achieve with that?

i am working a script where i want to get the installed location so that i can read the couchbase conf file without hardcoding the path

Unfortunately it seems that there isn’t a command/file where you can detect this. If you’re scripting the install, presumably you know where it will reside and could maybe write that to a known location at install time?

You can submit an enhancement request at: issues.couchbase.com

If the bin directory is in your path, the ‘which’ command will tell you which directory:

% which cbexport
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbexport

“i am working a script where i want to get the installed location so that i can read the couchbase conf file without hardcoding the path”

I don’t think the config file lives in the installation directory (?)

if linux

rpm -ql couchbase-server | grep couchbase-server | grep -v couchbase-server.service | awk '{print substr($0, 0, (index($0,"/bin"))-1);}'

If need to change (not sure what will be impact) you can use rpm -i --prefix=location , If need you can make symbolic link

I am scripting backup and restore and wanted to know the location of the install. I have multiple clusters and wat to have a generic script for all

Thanks :slight_smile:

But the path is not set for all clusters.

is this command to be run during installation or after installation ?

Run this command after installation

This comment is made based on UNIX rpm. It may not work with couchbase.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.