How to Install Cassandra Apache on Ubuntu 20.04

 

Apache Cassandra is a high-performance opensource NoSQL database engine that gives fault tolerance, linear scalability, and consistency throughout a number of nodes. Give its distributed structure, Apache Cassandra handles large volumes of information with dynamo-style replication. That is the place replicas are saved on a number of nodes in a cluster thus offering excessive availability and 0 factors of failure.

Apache Cassandra is good in IoT purposes the place huge knowledge is collected. It additionally turns out to be useful in Social Media analytics, messaging companies, and retail purposes.

Among the many firms that make use of Apache Cassandra embody Netflix, Fb, Cisco, Hulu, Twitter, and lots of extra.

On this article, you’ll discover ways to set up and configure Apache Cassandra on Ubuntu 20.04 and Ubuntu 18.04.

Step 1: Putting in Java on Ubuntu

Set up of Apache Cassandra begins with checking whether or not Java is put in. To be extra particular, OpenJDK is what’s required to work seamlessly with Apache Cassandra. Putting in a distinct model is extra possible to provide you errors throughout configuration.

To test whether or not Java is put in, run the command:

$ java -version

If Java shouldn’t be but put in, you will see that the output printed as proven in your terminal.

Test Java Set up on Ubuntu

To put in OpenJDK, execute the next apt command.

$ sudo apt set up openjdk-8-jdk

As soon as once more, affirm that Java is put in by operating the command.

$ java -version

Test Java Model in Ubuntu

Step 2: Set up Apache Cassandra in Ubuntu

With Java put in, we are going to proceed to put in Apache Cassandra. First, set up the apt-transport-https bundle to permit entry of repositories by way of the https protocol.

$ sudo apt set up apt-transport-https

Subsequent, Import the GPG key utilizing following wget command as proven.

$ wget -q -O – https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add –

Then add Apache Cassandra’s repository to the system’s sources listing file as proven.

$ sudo sh -c ‘echo “deb http://www.apache.org/dist/cassandra/debian 311x important” > /and so forth/apt/sources.listing.d/cassandra.listing’

Earlier than putting in Apache Cassandra, that you must replace the bundle listing first.

$ sudo apt replace

Then set up the NoSQL database utilizing the command:

$ sudo apt set up cassandra

Set up Apache Cassandra in Ubuntu

Often, Apache Cassandra begins mechanically. To substantiate its standing, run the next command:

$ sudo systemctl standing cassandra

The output beneath confirms that Cassandra is up and operating as anticipated.

Test Apache Cassandra Standing

Moreover, you’ll be able to confirm the stats of your node by operating the command.

$ sudo nodetool standing

Test Node Software Standing

To log in to Cassandra on the terminal, invoke the command.

$ cqlsh

Begin Cassandra cqlsh Shell

Step 3: Configuring Apache Cassandra in Ubuntu

Apache Cassandra configuration recordsdata are stacked within the /and so forth/cassandra listing while knowledge is saved in /var/lib/cassandra listing. Begin-up choices could be tweaked within the /and so forth/default/cassandra file.

Cassandra’s default cluster identify is ‘Check Cluster’. To alter this to a extra significant identify, log in to Cassandra.

$ cqlsh

To set the Cluster identify to your individual choice, run the command proven beneath. On this case, we’

You May Also Like