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 .
Asked
Active
Viewed 1,685 times
0
-
1Just append the $CASSANDRA_HOME/bin to $PATH http://askubuntu.com/questions/24937/how-do-i-set-path-variables-for-all-users-on-a-server – Ashraful Islam Oct 06 '16 at 10:01
2 Answers
0
- 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

Carlos Monroy Nieblas
- 2,225
- 2
- 16
- 27
0
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

Anower Perves
- 754
- 8
- 15