How can we set nodetool and cqlsh to be run from a

2019-09-06 02:58发布

I am trying to setup environment variables so that any user on a particular server can run commands like nodetool or cqlsh from any where in linux file system . The effort to traverse to bin directory everytime should be saved . How can we achieve this ? My DSE 4.8 is a tarball install .

2条回答
We Are One
2楼-- · 2019-09-06 03:43

To setup environment variable just follow some steps from root user:

# vi /etc/profile.d/cassandra.sh

Add the following lines to the cassandra.sh file-

export CASSANDRA_HOME=/opt/apache-cassandra-3.0.8
export CASSANDRA_CONF_DIR=/opt/apache-cassandra-3.0.8/conf

Here /opt/ is my directory, where I've extracted my apache-cassandra-3.0.8-bin.tar.gz tarball.

After adding those lines to cassandra.sh, save and exit. Then-

# source /etc/profile.d/cassandra.sh
查看更多
Ridiculous、
3楼-- · 2019-09-06 03:56
  • Nodetool is usually available to any user that has execution privileges in your linux boxes
  • For cqlsh, you can set any configuration inside the cqlshrc file (usually found in $HOME/.cassandra/cqlshrc; we have used to enable client-node encryption but has more configurable options
查看更多
登录 后发表回答