First, we must connect via ssh.
Add the Cassandra Repository File
echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
Add the GPG Key
To avoid problems with the repository, add the GPG key and increase the security of the repository.
Then we can add the key with the following command:
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
Install Cassandra on Ubuntu
sudo apt update
sudo apt install cassandra
Verify Apache Cassandra Installation
Finally, to make sure the Cassandra installation process completed properly, check cluster status:
nodetool status

UN
letters in the output signal that the cluster is working.You can also check Cassandra status by entering:
sudo systemctl status cassandra
The output should display active (running) in green.

Optional: Start Apache Cassandra Service Automatically on Boot
When you turn off or reboot your system, the Cassandra service switches to inactive.
To start Cassandra automatically after booting up, use the following command:
sudo systemctl enable cassandra
Test Cassandra Command-Line Shell
The Cassandra software package comes with its command-line tool (CLI). This tool uses Cassandra Query Language (CQL) for communication.
To start a new shell, open the terminal and type:
csqlsh

Conclusion
By following these simple steps, you should have a working Cassandra installation on your Ubuntu system.
Additionally, we showed you how to edit the most important parameters in the Cassandra configuration file. Remember to make a backup of the conf file, just in case, and you can start using the Cassandra database software.
Similar Posts:
- How to fix ‘add-apt-repository command not found’ Error on Ubuntu and Debian
- How to change static ip address on Ubuntu server 18.04
- How to block SASL login attacks in zimbra using csf
- Howto Renew Zimbra Letsencrypt SSL certificate
- how to setup source based (policy based) routing on debian / ubuntu