In my opinion, almost all the java-written apache projects need not the root privilege. Cassandra has the same feature.
Firstly, download apache-cassandra-bin.tar.gz from http://cassandra.apache.org/download/. Remember that do not use .deb or .rpm or others.
Secondly, run tar -xzf cassandra-bin.tar.gz
to unzip it to any folder, suppose the folder is $cassandra_home
Thirdly, just go to $cassandra_home/bin
, run ./cassandra
, done! The data is stored in $cassandra_home/data
and the logs are in $cassandra_home/logs
.
If you want to set the position of data and logs:
1st, go to $cassandra_home/conf
, modify cassandra.yaml
file.
Set these directories to the folder which you have read and write access:
- data_file_directories:
- commitlog_directory:
- cdc_raw_directory:
- hints_directory:
- saved_caches_directory:
(different cassandra version may have different parameters. You can just search director
in the yaml file.)
2nd, if you want to enable the log, modify the log file position, modify $cassandra_home/conf/logback.xml
(or log4j or others), and set the log folder to another position.
Enjoy it.
bin
directory, can you run and post the output from:ls -al cassandra
– Bornholm