Database Reference
In-Depth Information
3. You may want to edit $CASSANDRA_HOME/conf/cassandra.yaml to con-
figure Cassandra. It is advisable to change the data directory to a writable loca-
tion when you start Cassandra as a nonroot user.
4. To change the data directory, change the data_file_directories attrib-
ute in cassandra.yaml , as follows (here, the data directory is chosen as
/mnt/Cassandra/data ; you may want to set the directory where you want
to put the data):
data_file_directories:
- /mnt/cassandra/data
5. Set the commit log directory:
commitlog_directory: /mnt/cassandra/commitlog
6. Set the saved caches directory:
saved_caches_directory: /mnt/cassandra/saved_caches
7. Set the logging location. Edit $CASSANDRA_HOME/conf/log4j-serv-
er.properties as follows:
log4j.appender.R.File=/tmp/cassandra.log
With this, you are ready to start Cassandra. Fire up your shell and type in
$CASSANDRA_HOME/bin/cassandra -f . In this command, -f stands for fore-
ground. You can keep viewing the logs and press Ctrl + C to shut the server down. If you
want to run it in the background, do not use the -f option. If your data or log director-
ies are not set with the appropriate user permission, you may want to start Cassandra as
superuser using the sudo command. The server is ready when you see statistics in the
startup log:
Search WWH ::




Custom Search