Install Cassandra on Ubuntu 22.04
TL;DR
How to Install Cassandra on Ubuntu 22.04?
# Install Java 8
apt-get install openjdk-8-jdk -y
java -version
# install the required dependencies
apt-get install apt-transport-https gnupg2 -y
# import the Cassandra GPG key
wget -q -O - https://www.apache.org/dist/cassandra/KEYS | apt-key add -
# add the Cassandra repository to APT
sh -c 'echo "deb http://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'
# install the Apache Cassandra
apt-get update -y
apt-get install cassandra -y
systemctl status cassandra
ss -antpl | grep java
# check the status
nodetool status
# cli connect
cqlsh
# flush the system cache
nodetool flush system
# restart
systemctl restart cassandra