✅ Day 1: Introduction & Setup
🎯 Objective:
Set up the Cassandra environment and get familiar with basic tools and commands.
🛠️ 1. Install Apache Cassandra
Choose any one of the following:
Option 1: Using Debian/Ubuntu
sudo apt update
sudo apt install cassandra
Option 2: Using Docker
docker run --name cassandra-lab -p 9042:9042 -d cassandra
To check logs:
docker logs -f cassandra-lab
Option 3: Manual Download
- Download from https://cassandra.apache.org/download
- Extract and set environment variables
🧪 2. Verify Installation
Check Cassandra service status
nodetool status
Expected Output:
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID
UN 127.0.0.1 123.45 KB 256 100.0% xxxxxxx
Start the CQL shell
cqlsh
You should see a prompt like:
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh]>
🧭 3. Explore Basic Commands in cqlsh
HELP; -- View available commands
SHOW VERSION; -- Check Cassandra and CQL version
DESCRIBE CLUSTER; -- Show cluster info
DESCRIBE KEYSPACES; -- Show existing keyspaces
📂 4. Explore Cassandra Directory Structure
If installed manually or with package manager:
conf/
– configuration files (cassandra.yaml
)data/
– stores actual datalogs/
– Cassandra logsbin/
– start/stop scripts
🧑💻 Day 1 Lab Tasks
- Install Cassandra (via Docker or manually)
Start
cqlsh
and run:HELP;
SHOW VERSION;
DESCRIBE KEYSPACES;
- Use
nodetool status
to verify health - Find where the Cassandra config and data directories are
✅ Checklist
Task | Done |
---|---|
Installed Cassandra/Docker container | ✅ |
Ran cqlsh and connected successfully |
✅ |
Ran nodetool status |
✅ |
Explored basic commands | ✅ |
Understood directory structure | ✅ |