How to Install Cassandra on Ubuntu 18.10 Cosmic GNU/Linux Easy Guide

October 19, 2018 | By thelinuxevangelist | Filed in: Tutorial.

Cassandra Ubuntu 18.10 Install - Setting Up

  1. Relocate Cassandra Directory

    mv /tmp/apache-cassandra* /var/lib/cassandra
  2. Make Needed Directories

    mkdir -p /var/log/cassandra/log
    mkdir /var/lib/cassandra/{data,saved_caches,commitlog}
  3. Creating cassandra Group and Adding Users

    groupadd cassandra
    usermod -a -G cassandra [yourUser]
    usermod -a -G cassandra root
  4. Setting Ownership over Directories

    chown -R root:cassandra /var/lib/cassandra/
    chown -R root:cassandra /var/log/cassandra/
  5. Set Permissions over Directories

    chmod 775 /var/lib/cassandra/data/
    chmod 775 /var/lib/cassandra/saved_caches/
    chmod 770 /var/lib/cassandra/commitlog/
    chmod 770 /var/log/cassandra/log/
  6. Edit Cassandra Configuration File

    cd /var/lib/cassandra
    nano conf/cassandra.yaml

    Append:

    • data_file_directories:
       - /var/lib/cassandra/data
    • commitlog_directory: /var/lib/cassandra/commitlog
    • saved_caches_directory: /var/lib/cassandra/saved_caches

    Then Search and Comment Out:
    (Ctrl+w to Search on nano)

    #cluster_name: 'Test Cluster'

    Since no Cluster is stille in work…

  7. Set Cassandra Log4j Directory

    nano conf/log4j-server.properties

    Append:

    log4j.appender.R.file=/var/lib/cassandra/log/system.log

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,