If you are using a Debian flavor of Linux, such as Ubuntu, you can install via the advanced packaging tool (APT).[2] Start by adding the Apache repository to APT's list of sources. This command will add the repository for Cassandra 3.10:
echo "deb http://www.apache.org/dist/cassandra/debian 310x main" | sudo tee -a
/etc/apt/sources.list.d/cassandra.sources.list
Next, pull down the repository keys and add them to APT's list of keys:
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
Once that is done, update via apt-get and install:
sudo apt-get update
sudo apt-get install cassandra
Be aware that this method will install Cassandra as a service, and start it. By default, Cassandra will start with the cluster named test_cluster, and will be configured only to listen and broadcast on localhost. This may be fine for local development, but you may want to stop it in order to customize your configuration:
sudo service cassandra stop
If you intend to change the cluster name, you will need to wipe any files that were written to the data directory ($CASSANDRA_HOME/data by default).