This article covers how to install Apache Cassandra on Ubuntu 20.04 LTS. Apache Cassandra is an open-source non-relational database that delivers high performance, linear scalability, and continuous availability. All these features make Cassandra an ideal platform for mission-critical data.
To learn more about Apache Cassandra, visit its official documentation site.
How to install Java on Ubuntu ?
1. To check whether Java is installed, run the command:
$ java -version
2. To install OpenJDK, execute the following apt command:
$ sudo apt install openjdk-8-jdk
3. Once again, confirm that Java is installed by running the command:
$ java -version
How to Install Apache Cassandra in Ubuntu ?
1. First, install the apt-transport-https package to allow access of repositories via the https protocol:
$ sudo apt install apt-transport-https
2. Next, Import the GPG key using following wget command as shown:
$ wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
3. Then add Apache Cassandra's repository to the system’s sources list file as shown:
$ sudo sh -c 'echo "deb http://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'
4. Before installing Apache Cassandra, you need to update the package list first:
$ sudo apt update
5. Then install the NoSQL database using the command:
$ sudo apt install cassandra
6. Usually, Apache Cassandra starts automatically. To confirm its status, run the following command:
$ sudo systemctl status cassandra
7. Additionally, you can verify the stats of your node by running the command:
$ sudo nodetool status