
	I am going to run 3 Cassandra instances on a single computer.

Steps:

1) Install a Java JDK, I am using
     openjdk 11.0.13 2021-10-19 LTS

2) Set JAVA_HOME so Cassandra can use it (I do this in /etc/profile)
    JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_4.x86_64
    export JAVA_HOME

    export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac))))

/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_5.x86_64/bin/java


3) Download Cassandra from the Apache web site (I am using 4.0.1)
    https://www.apache.org/dyn/closer.lua/cassandra/4.0.1/apache-cassandra-4.0.1-bin.tar.gz

4) Unzip the Cassandra distribution, and name it 
    cassandra1

5) Copy the entire distribution folder 2 more times
    naming them cassandra2 and cassandra3

6) Starting with cassandra1 edit the conf/cassandra.yaml file for each of the 3 Cassandra copies
     we have to make the following changes:
      A) Name of the cluster (cluster_name)
           cluster_name: 'Training_Cluster'

      B) Data file directories(data_file_directories) 
           data_file_directories: /home/jonathan/cassandra1/data/data
           data_file_directories: /home/jonathan/cassandra2/data/data
           data_file_directories: /home/jonathan/cassandra3/data/data

      C) Commit log directory(commitlog_directory):  <- I need to create these directory
           commitlog_directory: /home/jonathan/cassandra1/commitlog  
           commitlog_directory: /home/jonathan/cassandra2/commitlog  
           commitlog_directory: /home/jonathan/cassandra3/commitlog  

      D) Saved cache directory(change path):   <- I need to create these directory
           saved_caches_directory: commitlog_directory: /home/jonathan/cassandra1/saved_caches  
           saved_caches_directory: commitlog_directory: /home/jonathan/cassandra2/saved_caches  
           saved_caches_directory: commitlog_directory: /home/jonathan/cassandra3/saved_caches  

      E) The listening address:
           listen_address: 127.0.0.1 (for cassandra1)
           listen_address: 127.0.0.2 (for cassandra2)
           listen_address: 127.0.0.3 (for cassandra3)

      F) The rpc-address:
           rpc_address: 127.0.0.1 (for cassandra1)
           rpc_address: 127.0.0.2 (for cassandra2)
           rpc_address: 127.0.0.3 (for cassandra3)

      G) Leave the default setting for the Seed Nodes 
           - seeds: "127.0.0.1:7000" (I will start cassandra1 first on 127.0.0.1:7000
                                       then cassandra2 and cassandra3 will discover the cluster)

7) Starting with cassandra1 edit each conf/cassandra.env.sh file
     we have to make the following change:
      A) The JMX_Port:
           JMX_PORT="7177" (for cassandra1)
           JMX_PORT="7188" (for cassandra2)
           JMX_PORT="7199" (for cassandra3)

8) Open 3 terminal windows one in each cassanda bin folder
      and run: ./cassandra -f
      start with cassanda1 so the next 2 instances will find the cluster
      based on the Seed Node settings in the cassandra.yaml.
     
      this will start each Cassandra as a foreground process in the terminal window

9) Open a new terminal window to any cassandra bin folder 
     and run: ./nodetool status







