installing cassandra linux windows
Installing Apache Cassandra on Linux and Windows step-by-step
Apache Cassandra is a highly scalable, open-source NoSQL database designed to handle large volumes of data with high availability and no single point of failure. Whether you’re setting up a local development environment or deploying it in production, understanding how to install Cassandra on Linux and Windows is essential for developers and data engineers.
In this guide, we’ll walk through the installation process for Apache Cassandra on both Linux and Windows systems, along with best practices for configuration and setup.
Prerequisites for installing Cassandra
Step-by-step installation on Linux (Ubuntu/CentOS)
Installation on Windows
Basic verification commands
Tips for post-installation configuration
Before installing Cassandra, ensure that the following requirements are met:
Java (JDK 8 or 11) is installed and configured.
Python 3 is available (for cqlsh utility).
Sufficient system memory and disk space (at least 4GB RAM).
Administrative or root access to the system.
To check Java installation:
java -version
sudo apt update
sudo apt install openjdk-11-jdk -y
Verify Java:
java -version
echo "deb https://debian.cassandra.apache.org 41x main" | sudo tee /etc/apt/sources.list.d/cassandra.list
curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -
sudo apt update
sudo apt install cassandra -y
sudo systemctl enable cassandra
sudo systemctl start cassandra
nodetool status
If Cassandra is running, you’ll see the node status as UN (Up/Normal).
Download and install JDK 11 from Oracle or OpenJDK, then add it to your PATH environment variable.
Download Python from python.org and ensure it’s added to PATH.
Go to the official Apache Cassandra website: https://cassandra.apache.org/download
Download the binary tarball (zip file) for Windows.
Unzip the downloaded file to a preferred location, for example:
C:\apache-cassandra\
Add the Cassandra bin
directory to your system PATH:
C:\apache-cassandra\bin
Open Command Prompt and navigate to the Cassandra bin folder:
cd C:\apache-cassandra\bin
cassandra.bat
To check if Cassandra is running, open another terminal and run:
cqlsh
If successful, you’ll enter the Cassandra Query Language shell.
Modify cassandra.yaml
:
Located in the /etc/cassandra/
directory (Linux) or conf/
(Windows).
Configure cluster name, seeds, and listen address.
Check Logs:
tail -f /var/log/cassandra/system.log
Access CQL Shell:
cqlsh
Verify Cluster Health:
nodetool status
Always install a supported Java version for Cassandra’s release.
Tune heap size and GC settings in jvm.options
for better performance.
For production environments, set up multi-node clusters with proper replication.
Use authentication and SSL for secure deployments.
Installing Apache Cassandra on Linux and Windows is straightforward once you understand the prerequisites and setup steps. With Cassandra up and running, you can start building high-performance, distributed applications that scale effortlessly.
By following this guide, you’ll ensure a clean, efficient installation and a properly configured environment for your NoSQL data workloads.