tar -xzvf apache-cassandra-3.6-bin.tar.gz
The files will be extracted into
apache-cassandra-3.6, you need to substitute 3.6 with the release number that you
apache-cassandra-3.6\binto your path.
bin/cassandra -ffrom the command line. Press “Control-C” to stop Cassandra. Start Cassandra in the background by invoking
bin/cassandrafrom the command line. Invoke
pkill -f CassandraDaemonto stop Cassandra, where pid is the Cassandra process id, which you can find for example by invoking
pgrep -f CassandraDaemon.
bin/nodetool statusfrom the command line.
datasub-directories respectively. Older versions defaulted to
/var/lib/cassandra. Due to this, it is necessary to either start Cassandra with root privileges or change
conf/cassandra.yamlto use directories owned by the current user, as explained below in the section on changing the location of directories.
/etc/apt/sources.list.d/cassandra.sources.list, for example for version 3.6:
echo "deb http://www.apache.org/dist/cassandra/debian 36x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
sudo apt-get update
GPG error: http://www.apache.org 36x InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A278B781FE4B2BDA
Then add the public key A278B781FE4B2BDA as follows:
sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
sudo apt-get update. The actual key may be different, you get it from the error message itself. For a
full list of Apache contributors public keys, you can refer to this link.
sudo apt-get install cassandra
sudo service cassandra startand stop it with
sudo service cassandra stop. However, normally the service will start automatically. For this reason be sure to stop it if you need to make any configuration changes.
nodetool statusfrom the command line.