Apache Cassandra is a free and open-source, distributed NoSQL database system with high availability across multiple systems thus eliminating a single failure point. If you need a database management system with scalability and high availability, you may want to look at Apache Cassandra. This database platform is used by small and large companies that process massive amounts of data. Data is automatically replicated to multiple nodes for fault tolerance. with no single points of failure. For more about Apache Cassandra, please visit its homepage. If you want to test it in your lab environment before going out and using it in production, the steps below should be a great place to start. Follow the steps below to get Apache Cassandra installed on Ubuntu
Install JAVA
To get the latest version of Apache Cassandra, you can either use it.DEB file from its website or add its official repository to Ubuntu. However, you are going to need Oracle JAVA installed on the system for Cassandra to work. The open-source version of Oracle JAVA works great with Cassandra, so for this tutorial, we’re going to be using OpenJDK 8. To install OpenJDK 8, run the commands below: To verify if OpenJDK is installed and running, run the commands below: It should print out the lines similar to the ones below: After installing OpenJDK 8, continue below to install Apache Cassandra.
Installing Apache Cassandra
Now that JAVA is installed, follow the steps below to get Apache Cassandra installed and configured.
If you don’t want to manually install the Cassandra from it.DEB file, then add Cassandra’s official package repository to make installing and updating it easier.
To add the Apache Cassandra repository and key, run the commands below. The first line imports the repository’s GPG key. the second adds the Apache Cassandra repository into a new file called cassandra.sources.list.
After the steps above, run the commands below to install them.
That should do it!
To verify if Cassandra is correctly installed, run the commands below:
You should see a similar screen print as the one below:
That’s how you know Cassandra is installed and running.
To interact with Cassandra through CQL (the Cassandra Query Language) you can use a command line utility named cqlsh
You should log on to the CQL terminal screen.
Use HELP for help. cqlsh>
Conclusion:
This post showed you how to install Apache Cassandra on Ubuntu 20.04 | 18.04. If you find any error please use the comment form below to report it.
You may also like the post below: